diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-09-10 19:40:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-10 19:40:18 +0200 |
commit | b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e (patch) | |
tree | 0aa00226283cb4a22b8e8d6206993faf7d1e3398 /src/video_core/renderer_vulkan | |
parent | vk_buffer_cache: Respect max vertex bindings in BindVertexBuffers (#11471) (diff) | |
parent | renderer_vulkan: Remove debug report (diff) | |
download | yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.gz yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.bz2 yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.lz yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.xz yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.zst yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 18 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.h | 4 |
2 files changed, 3 insertions, 19 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 454bb66a4..c4c30d807 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -66,21 +66,6 @@ std::string BuildCommaSeparatedExtensions( return fmt::format("{}", fmt::join(available_extensions, ",")); } -DebugCallback MakeDebugCallback(const vk::Instance& instance, const vk::InstanceDispatch& dld) { - if (!Settings::values.renderer_debug) { - return DebugCallback{}; - } - const std::optional properties = vk::EnumerateInstanceExtensionProperties(dld); - const auto it = std::ranges::find_if(*properties, [](const auto& prop) { - return std::strcmp(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, prop.extensionName) == 0; - }); - if (it != properties->end()) { - return CreateDebugUtilsCallback(instance); - } else { - return CreateDebugReportCallback(instance); - } -} - } // Anonymous namespace Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dld, @@ -103,7 +88,8 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_, cpu_memory(cpu_memory_), gpu(gpu_), library(OpenLibrary(context.get())), instance(CreateInstance(*library, dld, VK_API_VERSION_1_1, render_window.GetWindowInfo().type, Settings::values.renderer_debug.GetValue())), - debug_callback(MakeDebugCallback(instance, dld)), + debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance) + : vk::DebugUtilsMessenger{}), surface(CreateSurface(instance, render_window.GetWindowInfo())), device(CreateDevice(instance, dld, *surface)), memory_allocator(device), state_tracker(), scheduler(device, state_tracker), diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.h b/src/video_core/renderer_vulkan/renderer_vulkan.h index 89e98425e..590bc1c64 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.h +++ b/src/video_core/renderer_vulkan/renderer_vulkan.h @@ -35,8 +35,6 @@ class GPU; namespace Vulkan { -using DebugCallback = std::variant<vk::DebugUtilsMessenger, vk::DebugReportCallback>; - Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dld, VkSurfaceKHR surface); @@ -75,7 +73,7 @@ private: vk::InstanceDispatch dld; vk::Instance instance; - DebugCallback debug_callback; + vk::DebugUtilsMessenger debug_messenger; vk::SurfaceKHR surface; ScreenInfo screen_info; |