From 18831e0933231661a99e713c4a4fc94153ef0c3b Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 3 Dec 2022 10:37:12 -0500 Subject: vulkan_common: clean up extension usage --- src/video_core/vulkan_common/vulkan_device.cpp | 121 +++++++++++------------- src/video_core/vulkan_common/vulkan_device.h | 2 +- src/video_core/vulkan_common/vulkan_wrapper.cpp | 31 ++++-- src/video_core/vulkan_common/vulkan_wrapper.h | 11 ++- 4 files changed, 84 insertions(+), 81 deletions(-) (limited to 'src/video_core/vulkan_common') diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 2be9e2e52..13b5da341 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -305,10 +305,10 @@ NvidiaArchitecture GetNvidiaArchitecture(vk::PhysicalDevice physical, VkPhysicalDeviceFragmentShadingRatePropertiesKHR shading_rate_props{}; shading_rate_props.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR; - VkPhysicalDeviceProperties2KHR physical_properties{}; - physical_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR; + VkPhysicalDeviceProperties2 physical_properties{}; + physical_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; physical_properties.pNext = &shading_rate_props; - physical.GetProperties2KHR(physical_properties); + physical.GetProperties2(physical_properties); if (shading_rate_props.primitiveFragmentShadingRateWithMultipleViewports) { // Only Ampere and newer support this feature return NvidiaArchitecture::AmpereOrNewer; @@ -416,8 +416,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; SetNext(next, bit16_storage); - VkPhysicalDevice8BitStorageFeaturesKHR bit8_storage{ - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR, + VkPhysicalDevice8BitStorageFeatures bit8_storage{ + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES, .pNext = nullptr, .storageBuffer8BitAccess = false, .uniformAndStorageBuffer8BitAccess = true, @@ -441,8 +441,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; SetNext(next, host_query_reset); - VkPhysicalDeviceVariablePointerFeaturesKHR variable_pointers{ - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR, + VkPhysicalDeviceVariablePointerFeatures variable_pointers{ + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, .pNext = nullptr, .variablePointersStorageBuffer = VK_TRUE, .variablePointers = VK_TRUE, @@ -456,10 +456,10 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; SetNext(next, demote); - VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8; + VkPhysicalDeviceShaderFloat16Int8Features float16_int8; if (is_int8_supported || is_float16_supported) { float16_int8 = { - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, .pNext = nullptr, .shaderFloat16 = is_float16_supported, .shaderInt8 = is_int8_supported, @@ -485,10 +485,10 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR LOG_INFO(Render_Vulkan, "Device doesn't support passthrough geometry shaders"); } - VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR std430_layout; + VkPhysicalDeviceUniformBufferStandardLayoutFeatures std430_layout; if (khr_uniform_buffer_standard_layout) { std430_layout = { - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR, + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES, .pNext = nullptr, .uniformBufferStandardLayout = true, }; @@ -606,10 +606,10 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR LOG_INFO(Render_Vulkan, "Device doesn't support vertex input dynamic state"); } - VkPhysicalDeviceShaderAtomicInt64FeaturesKHR atomic_int64; + VkPhysicalDeviceShaderAtomicInt64Features atomic_int64; if (ext_shader_atomic_int64) { atomic_int64 = { - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR, + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES, .pNext = nullptr, .shaderBufferInt64Atomics = VK_TRUE, .shaderSharedInt64Atomics = VK_TRUE, @@ -965,8 +965,8 @@ void Device::CheckSuitability(bool requires_swapchain) const { demote.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES; demote.pNext = nullptr; - VkPhysicalDeviceVariablePointerFeaturesKHR variable_pointers{}; - variable_pointers.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR; + VkPhysicalDeviceVariablePointerFeatures variable_pointers{}; + variable_pointers.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; variable_pointers.pNext = &demote; VkPhysicalDeviceRobustness2FeaturesEXT robustness2{}; @@ -989,11 +989,11 @@ void Device::CheckSuitability(bool requires_swapchain) const { host_query_reset.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; host_query_reset.pNext = &bit8_storage; - VkPhysicalDeviceFeatures2KHR features2{}; + VkPhysicalDeviceFeatures2 features2{}; features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; features2.pNext = &host_query_reset; - physical.GetFeatures2KHR(features2); + physical.GetFeatures2(features2); const VkPhysicalDeviceFeatures& features{features2.features}; std::array feature_report{ @@ -1126,37 +1126,37 @@ std::vector Device::LoadExtensions(bool requires_surface) { VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME, false); } } - VkPhysicalDeviceFeatures2KHR features{}; - features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; + VkPhysicalDeviceFeatures2 features{}; + features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; - VkPhysicalDeviceProperties2KHR physical_properties{}; - physical_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR; + VkPhysicalDeviceProperties2 physical_properties{}; + physical_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; if (has_khr_shader_float16_int8) { - VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8_features; - float16_int8_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR; + VkPhysicalDeviceShaderFloat16Int8Features float16_int8_features; + float16_int8_features.sType = + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; float16_int8_features.pNext = nullptr; features.pNext = &float16_int8_features; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); is_float16_supported = float16_int8_features.shaderFloat16; is_int8_supported = float16_int8_features.shaderInt8; extensions.push_back(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME); } if (has_ext_subgroup_size_control) { - VkPhysicalDeviceSubgroupSizeControlFeaturesEXT subgroup_features; - subgroup_features.sType = - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT; + VkPhysicalDeviceSubgroupSizeControlFeatures subgroup_features; + subgroup_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES; subgroup_features.pNext = nullptr; features.pNext = &subgroup_features; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); - VkPhysicalDeviceSubgroupSizeControlPropertiesEXT subgroup_properties; + VkPhysicalDeviceSubgroupSizeControlProperties subgroup_properties; subgroup_properties.sType = - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT; + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES; subgroup_properties.pNext = nullptr; physical_properties.pNext = &subgroup_properties; - physical.GetProperties2KHR(physical_properties); + physical.GetProperties2(physical_properties); is_warp_potentially_bigger = subgroup_properties.maxSubgroupSize > GuestWarpSize; @@ -1175,7 +1175,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { provoking_vertex.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT; provoking_vertex.pNext = nullptr; features.pNext = &provoking_vertex; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (provoking_vertex.provokingVertexLast && provoking_vertex.transformFeedbackPreservesProvokingVertex) { @@ -1189,7 +1189,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT; vertex_input.pNext = nullptr; features.pNext = &vertex_input; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (vertex_input.vertexInputDynamicState) { extensions.push_back(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); @@ -1201,7 +1201,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { atomic_int64.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES; atomic_int64.pNext = nullptr; features.pNext = &atomic_int64; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (atomic_int64.shaderBufferInt64Atomics && atomic_int64.shaderSharedInt64Atomics) { extensions.push_back(VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME); @@ -1213,13 +1213,13 @@ std::vector Device::LoadExtensions(bool requires_surface) { tfb_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT; tfb_features.pNext = nullptr; features.pNext = &tfb_features; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); VkPhysicalDeviceTransformFeedbackPropertiesEXT tfb_properties; tfb_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT; tfb_properties.pNext = nullptr; physical_properties.pNext = &tfb_properties; - physical.GetProperties2KHR(physical_properties); + physical.GetProperties2(physical_properties); if (tfb_features.transformFeedback && tfb_features.geometryStreams && tfb_properties.maxTransformFeedbackStreams >= 4 && @@ -1234,7 +1234,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { border_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT; border_features.pNext = nullptr; features.pNext = &border_features; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (border_features.customBorderColors && border_features.customBorderColorWithoutFormat) { extensions.push_back(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); @@ -1247,7 +1247,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT; extended_dynamic_state.pNext = nullptr; features.pNext = &extended_dynamic_state; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (extended_dynamic_state.extendedDynamicState) { extensions.push_back(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); @@ -1259,7 +1259,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { line_raster.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT; line_raster.pNext = nullptr; features.pNext = &line_raster; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (line_raster.rectangularLines && line_raster.smoothLines) { extensions.push_back(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME); ext_line_rasterization = true; @@ -1271,7 +1271,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR; layout.pNext = nullptr; features.pNext = &layout; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (layout.workgroupMemoryExplicitLayout && layout.workgroupMemoryExplicitLayout8BitAccess && @@ -1287,7 +1287,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR; executable_properties.pNext = nullptr; features.pNext = &executable_properties; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); if (executable_properties.pipelineExecutableInfo) { extensions.push_back(VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME); @@ -1300,7 +1300,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; primitive_topology_list_restart.pNext = nullptr; features.pNext = &primitive_topology_list_restart; - physical.GetFeatures2KHR(features); + physical.GetFeatures2(features); is_topology_list_restart_supported = primitive_topology_list_restart.primitiveTopologyListRestart; @@ -1318,7 +1318,7 @@ std::vector Device::LoadExtensions(bool requires_surface) { push_descriptor.pNext = nullptr; physical_properties.pNext = &push_descriptor; - physical.GetProperties2KHR(physical_properties); + physical.GetProperties2(physical_properties); max_push_descriptors = push_descriptor.maxPushDescriptors; } @@ -1369,18 +1369,18 @@ void Device::SetupFeatures() { } void Device::SetupProperties() { - float_controls.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR; + float_controls.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES; VkPhysicalDeviceProperties2KHR properties2{}; - properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR; + properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; properties2.pNext = &float_controls; - physical.GetProperties2KHR(properties2); + physical.GetProperties2(properties2); } void Device::CollectTelemetryParameters() { - VkPhysicalDeviceDriverPropertiesKHR driver{ - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR, + VkPhysicalDeviceDriverProperties driver{ + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, .pNext = nullptr, .driverID = {}, .driverName = {}, @@ -1388,12 +1388,12 @@ void Device::CollectTelemetryParameters() { .conformanceVersion = {}, }; - VkPhysicalDeviceProperties2KHR device_properties{ - .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR, + VkPhysicalDeviceProperties2 device_properties{ + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, .pNext = &driver, .properties = {}, }; - physical.GetProperties2KHR(device_properties); + physical.GetProperties2(device_properties); driver_id = driver.driverID; vendor_name = driver.driverName; @@ -1449,23 +1449,10 @@ void Device::CollectToolingInfo() { if (!ext_tooling_info) { return; } - const auto vkGetPhysicalDeviceToolPropertiesEXT = - reinterpret_cast( - dld.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceToolPropertiesEXT")); - if (!vkGetPhysicalDeviceToolPropertiesEXT) { - return; - } - u32 tool_count = 0; - if (vkGetPhysicalDeviceToolPropertiesEXT(physical, &tool_count, nullptr) != VK_SUCCESS) { - return; - } - std::vector tools(tool_count); - if (vkGetPhysicalDeviceToolPropertiesEXT(physical, &tool_count, tools.data()) != VK_SUCCESS) { - return; - } - for (const VkPhysicalDeviceToolPropertiesEXT& tool : tools) { + auto tools{physical.GetPhysicalDeviceToolProperties()}; + for (const VkPhysicalDeviceToolProperties& tool : tools) { const std::string_view name = tool.name; - LOG_INFO(Render_Vulkan, "{}", name); + LOG_INFO(Render_Vulkan, "Attached debugging tool: {}", name); has_renderdoc = has_renderdoc || name == "RenderDoc"; has_nsight_graphics = has_nsight_graphics || name == "NVIDIA Nsight Graphics"; } diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index c85fbba77..db802437c 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -217,7 +217,7 @@ public: } /// Returns true if VK_KHR_pipeline_executable_properties is enabled. - bool IsKhrPipelineEexecutablePropertiesEnabled() const { + bool IsKhrPipelineExecutablePropertiesEnabled() const { return khr_pipeline_executable_properties; } diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index 143fe7652..e4a07813f 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -235,12 +235,13 @@ bool Load(VkInstance instance, InstanceDispatch& dld) noexcept { X(vkCreateDebugUtilsMessengerEXT); X(vkDestroyDebugUtilsMessengerEXT); X(vkDestroySurfaceKHR); - X(vkGetPhysicalDeviceFeatures2KHR); - X(vkGetPhysicalDeviceProperties2KHR); + X(vkGetPhysicalDeviceFeatures2); + X(vkGetPhysicalDeviceProperties2); X(vkGetPhysicalDeviceSurfaceCapabilitiesKHR); X(vkGetPhysicalDeviceSurfaceFormatsKHR); X(vkGetPhysicalDeviceSurfacePresentModesKHR); X(vkGetPhysicalDeviceSurfaceSupportKHR); + X(vkGetPhysicalDeviceToolProperties); X(vkGetSwapchainImagesKHR); X(vkQueuePresentKHR); @@ -868,20 +869,20 @@ VkPhysicalDeviceProperties PhysicalDevice::GetProperties() const noexcept { return properties; } -void PhysicalDevice::GetProperties2KHR(VkPhysicalDeviceProperties2KHR& properties) const noexcept { - dld->vkGetPhysicalDeviceProperties2KHR(physical_device, &properties); +void PhysicalDevice::GetProperties2(VkPhysicalDeviceProperties2& properties) const noexcept { + dld->vkGetPhysicalDeviceProperties2(physical_device, &properties); } VkPhysicalDeviceFeatures PhysicalDevice::GetFeatures() const noexcept { - VkPhysicalDeviceFeatures2KHR features2; - features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR; + VkPhysicalDeviceFeatures2 features2; + features2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2; features2.pNext = nullptr; - dld->vkGetPhysicalDeviceFeatures2KHR(physical_device, &features2); + dld->vkGetPhysicalDeviceFeatures2(physical_device, &features2); return features2.features; } -void PhysicalDevice::GetFeatures2KHR(VkPhysicalDeviceFeatures2KHR& features) const noexcept { - dld->vkGetPhysicalDeviceFeatures2KHR(physical_device, &features); +void PhysicalDevice::GetFeatures2(VkPhysicalDeviceFeatures2& features) const noexcept { + dld->vkGetPhysicalDeviceFeatures2(physical_device, &features); } VkFormatProperties PhysicalDevice::GetFormatProperties(VkFormat format) const noexcept { @@ -906,6 +907,18 @@ std::vector PhysicalDevice::GetQueueFamilyProperties() return properties; } +std::vector PhysicalDevice::GetPhysicalDeviceToolProperties() + const { + u32 num = 0; + if (!dld->vkGetPhysicalDeviceToolProperties) { + return {}; + } + dld->vkGetPhysicalDeviceToolProperties(physical_device, &num, nullptr); + std::vector properties(num); + dld->vkGetPhysicalDeviceToolProperties(physical_device, &num, properties.data()); + return properties; +} + bool PhysicalDevice::GetSurfaceSupportKHR(u32 queue_family_index, VkSurfaceKHR surface) const { VkBool32 supported; Check(dld->vkGetPhysicalDeviceSurfaceSupportKHR(physical_device, queue_family_index, surface, diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index 9997420dd..8395ff2cb 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -168,12 +168,13 @@ struct InstanceDispatch { PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties{}; PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices{}; PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr{}; - PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR{}; + PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2{}; PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties{}; PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties{}; PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2{}; PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties{}; - PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR{}; + PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2{}; + PFN_vkGetPhysicalDeviceToolProperties vkGetPhysicalDeviceToolProperties{}; PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties{}; PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR{}; PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR{}; @@ -910,11 +911,11 @@ public: VkPhysicalDeviceProperties GetProperties() const noexcept; - void GetProperties2KHR(VkPhysicalDeviceProperties2KHR&) const noexcept; + void GetProperties2(VkPhysicalDeviceProperties2&) const noexcept; VkPhysicalDeviceFeatures GetFeatures() const noexcept; - void GetFeatures2KHR(VkPhysicalDeviceFeatures2KHR&) const noexcept; + void GetFeatures2(VkPhysicalDeviceFeatures2&) const noexcept; VkFormatProperties GetFormatProperties(VkFormat) const noexcept; @@ -922,6 +923,8 @@ public: std::vector GetQueueFamilyProperties() const; + std::vector GetPhysicalDeviceToolProperties() const; + bool GetSurfaceSupportKHR(u32 queue_family_index, VkSurfaceKHR) const; VkSurfaceCapabilitiesKHR GetSurfaceCapabilitiesKHR(VkSurfaceKHR) const; -- cgit v1.2.3