summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/vulkan/vk-api.h36
-rw-r--r--tools/gfx/vulkan/vk-device.cpp17
2 files changed, 39 insertions, 14 deletions
diff --git a/tools/gfx/vulkan/vk-api.h b/tools/gfx/vulkan/vk-api.h
index f7523eb7f..27a19acfb 100644
--- a/tools/gfx/vulkan/vk-api.h
+++ b/tools/gfx/vulkan/vk-api.h
@@ -241,32 +241,43 @@ struct VulkanExtendedFeatureProperties
{
// 16 bit storage features
VkPhysicalDevice16BitStorageFeatures storage16BitFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR
+ };
// Atomic Float features
VkPhysicalDeviceShaderAtomicFloatFeaturesEXT atomicFloatFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT
+ };
+ VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT atomicFloat2Features = {
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT
+ };
// Extended dynamic state features
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT extendedDynamicStateFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT
+ };
// Acceleration structure features
VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR
+ };
// Ray tracing pipeline features
VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeatures = {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR
};
// Ray query (inline ray-tracing) features
VkPhysicalDeviceRayQueryFeaturesKHR rayQueryFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR
+ };
// Inline uniform block features
VkPhysicalDeviceInlineUniformBlockFeaturesEXT inlineUniformBlockFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT
+ };
// Robustness2 features
VkPhysicalDeviceRobustness2FeaturesEXT robustness2Features = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT
+ };
VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV rayTracingInvocationReorderFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV
+ };
// Clock features
VkPhysicalDeviceShaderClockFeaturesKHR clockFeatures = {
@@ -280,15 +291,18 @@ struct VulkanExtendedFeatureProperties
// Multiview features
VkPhysicalDeviceMultiviewFeaturesKHR multiviewFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR };
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR
+ };
// Fragment shading rate features
VkPhysicalDeviceFragmentShadingRateFeaturesKHR fragmentShadingRateFeatures = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR };
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR
+ };
// Vulkan 1.2 features.
VkPhysicalDeviceVulkan12Features vulkan12Features = {
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES};
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES
+ };
};
struct VulkanApi
diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp
index 2a914b86b..1b046d8f2 100644
--- a/tools/gfx/vulkan/vk-device.cpp
+++ b/tools/gfx/vulkan/vk-device.cpp
@@ -476,13 +476,17 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
extendedFeatures.clockFeatures.pNext = deviceFeatures2.pNext;
deviceFeatures2.pNext = &extendedFeatures.clockFeatures;
- // Atomic Float
+ // Atomic Float
// To detect atomic float we need
// https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.html
extendedFeatures.atomicFloatFeatures.pNext = deviceFeatures2.pNext;
deviceFeatures2.pNext = &extendedFeatures.atomicFloatFeatures;
+ // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT.html
+ extendedFeatures.atomicFloat2Features.pNext = deviceFeatures2.pNext;
+ deviceFeatures2.pNext = &extendedFeatures.atomicFloat2Features;
+
// mesh shader features
extendedFeatures.meshShaderFeatures.pNext = deviceFeatures2.pNext;
deviceFeatures2.pNext = &extendedFeatures.meshShaderFeatures;
@@ -543,7 +547,7 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
// SIMPLE_EXTENSION_FEATURE(struct, feature member name, extension
// name, features...) will check for the presence of the boolean
// feature member in struct and the availability of the extensions. If
- // they are both present then the extensions are addded, the struct
+ // they are both present then the extensions are added, the struct
// linked into the deviceCreateInfo chain and the features added to the
// supported features list.
#define SIMPLE_EXTENSION_FEATURE(s, m, e, ...) \
@@ -563,12 +567,19 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
SIMPLE_EXTENSION_FEATURE(
extendedFeatures.atomicFloatFeatures,
- shaderBufferFloat32AtomicAdd,
+ shaderBufferFloat32Atomics,
VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME,
"atomic-float"
);
SIMPLE_EXTENSION_FEATURE(
+ extendedFeatures.atomicFloat2Features,
+ shaderBufferFloat16Atomics,
+ VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME,
+ "atomic-float-2"
+ );
+
+ SIMPLE_EXTENSION_FEATURE(
extendedFeatures.extendedDynamicStateFeatures,
extendedDynamicState,
VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME,