summaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorGravatar Liam2022-12-02 17:12:54 -0500
committerGravatar Liam2022-12-04 10:55:13 -0500
commit7fc6514be12c79f8fe1a87ee8b5f0ae9b04b2462 (patch)
tree666b273617ffcbd4f1fc11c11cf663c1fed25044 /src/video_core/vulkan_common
parentvulkan_common: promote descriptor update template usage to core (diff)
downloadyuzu-7fc6514be12c79f8fe1a87ee8b5f0ae9b04b2462.tar.gz
yuzu-7fc6514be12c79f8fe1a87ee8b5f0ae9b04b2462.tar.xz
yuzu-7fc6514be12c79f8fe1a87ee8b5f0ae9b04b2462.zip
vulkan_common: promote host query reset usage to core
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp8
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.cpp7
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.h6
3 files changed, 11 insertions, 10 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 72968a01c..c2bea3e9e 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -77,10 +77,6 @@ enum class NvidiaArchitecture {
77constexpr std::array REQUIRED_EXTENSIONS{ 77constexpr std::array REQUIRED_EXTENSIONS{
78 VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, 78 VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME,
79 VK_EXT_ROBUSTNESS_2_EXTENSION_NAME, 79 VK_EXT_ROBUSTNESS_2_EXTENSION_NAME,
80
81 // Core in 1.2, but required due to use of extension methods,
82 // and well-supported by drivers
83 VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME,
84#ifdef _WIN32 80#ifdef _WIN32
85 VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, 81 VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME,
86#endif 82#endif
@@ -438,8 +434,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
438 }; 434 };
439 SetNext(next, robustness2); 435 SetNext(next, robustness2);
440 436
441 VkPhysicalDeviceHostQueryResetFeaturesEXT host_query_reset{ 437 VkPhysicalDeviceHostQueryResetFeatures host_query_reset{
442 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT, 438 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES,
443 .pNext = nullptr, 439 .pNext = nullptr,
444 .hostQueryReset = true, 440 .hostQueryReset = true,
445 }; 441 };
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp
index f842524c4..1592d4184 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.cpp
+++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp
@@ -184,7 +184,7 @@ void Load(VkDevice device, DeviceDispatch& dld) noexcept {
184 X(vkMapMemory); 184 X(vkMapMemory);
185 X(vkQueueSubmit); 185 X(vkQueueSubmit);
186 X(vkResetFences); 186 X(vkResetFences);
187 X(vkResetQueryPoolEXT); 187 X(vkResetQueryPool);
188 X(vkSetDebugUtilsObjectNameEXT); 188 X(vkSetDebugUtilsObjectNameEXT);
189 X(vkSetDebugUtilsObjectTagEXT); 189 X(vkSetDebugUtilsObjectTagEXT);
190 X(vkUnmapMemory); 190 X(vkUnmapMemory);
@@ -199,6 +199,11 @@ void Load(VkDevice device, DeviceDispatch& dld) noexcept {
199 Proc(dld.vkWaitForFences, dld, "vkWaitForFencesKHR", device); 199 Proc(dld.vkWaitForFences, dld, "vkWaitForFencesKHR", device);
200 Proc(dld.vkWaitSemaphores, dld, "vkWaitSemaphoresKHR", device); 200 Proc(dld.vkWaitSemaphores, dld, "vkWaitSemaphoresKHR", device);
201 } 201 }
202
203 // Support for host query reset is mandatory in Vulkan 1.2
204 if (!dld.vkResetQueryPool) {
205 Proc(dld.vkResetQueryPool, dld, "vkResetQueryPoolEXT", device);
206 }
202#undef X 207#undef X
203} 208}
204 209
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h
index 101205386..9997420dd 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.h
+++ b/src/video_core/vulkan_common/vulkan_wrapper.h
@@ -301,7 +301,7 @@ struct DeviceDispatch : InstanceDispatch {
301 PFN_vkMapMemory vkMapMemory{}; 301 PFN_vkMapMemory vkMapMemory{};
302 PFN_vkQueueSubmit vkQueueSubmit{}; 302 PFN_vkQueueSubmit vkQueueSubmit{};
303 PFN_vkResetFences vkResetFences{}; 303 PFN_vkResetFences vkResetFences{};
304 PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT{}; 304 PFN_vkResetQueryPool vkResetQueryPool{};
305 PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT{}; 305 PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT{};
306 PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT{}; 306 PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT{};
307 PFN_vkUnmapMemory vkUnmapMemory{}; 307 PFN_vkUnmapMemory vkUnmapMemory{};
@@ -884,8 +884,8 @@ public:
884 return dld->vkDeviceWaitIdle(handle); 884 return dld->vkDeviceWaitIdle(handle);
885 } 885 }
886 886
887 void ResetQueryPoolEXT(VkQueryPool query_pool, u32 first, u32 count) const noexcept { 887 void ResetQueryPool(VkQueryPool query_pool, u32 first, u32 count) const noexcept {
888 dld->vkResetQueryPoolEXT(handle, query_pool, first, count); 888 dld->vkResetQueryPool(handle, query_pool, first, count);
889 } 889 }
890 890
891 VkResult GetQueryResults(VkQueryPool query_pool, u32 first, u32 count, std::size_t data_size, 891 VkResult GetQueryResults(VkQueryPool query_pool, u32 first, u32 count, std::size_t data_size,