diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gfx/vulkan/vk-api.h | 3 | ||||
| -rw-r--r-- | tools/gfx/vulkan/vk-device.cpp | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tools/gfx/vulkan/vk-api.h b/tools/gfx/vulkan/vk-api.h index d20cd555c..b7cbf13de 100644 --- a/tools/gfx/vulkan/vk-api.h +++ b/tools/gfx/vulkan/vk-api.h @@ -261,6 +261,9 @@ struct VulkanExtendedFeatureProperties VkPhysicalDeviceRobustness2FeaturesEXT robustness2Features = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT}; + VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV rayTracingInvocationReorderFeatures = { + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV}; + // Clock features VkPhysicalDeviceShaderClockFeaturesKHR clockFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp index 4fbf987e9..bed9c038a 100644 --- a/tools/gfx/vulkan/vk-device.cpp +++ b/tools/gfx/vulkan/vk-device.cpp @@ -405,6 +405,10 @@ Result DeviceImpl::initVulkanInstanceAndDevice( extendedFeatures.rayTracingPipelineFeatures.pNext = deviceFeatures2.pNext; deviceFeatures2.pNext = &extendedFeatures.rayTracingPipelineFeatures; + // SER features. + extendedFeatures.rayTracingInvocationReorderFeatures.pNext = deviceFeatures2.pNext; + deviceFeatures2.pNext = &extendedFeatures.rayTracingInvocationReorderFeatures; + // Acceleration structure features extendedFeatures.accelerationStructureFeatures.pNext = deviceFeatures2.pNext; deviceFeatures2.pNext = &extendedFeatures.accelerationStructureFeatures; @@ -582,6 +586,16 @@ Result DeviceImpl::initVulkanInstanceAndDevice( m_features.add("mesh-shader"); } + if (extendedFeatures.rayTracingInvocationReorderFeatures.rayTracingInvocationReorder) + { + deviceExtensions.add(VK_NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME); + + extendedFeatures.rayTracingInvocationReorderFeatures.pNext = (void*)deviceCreateInfo.pNext; + deviceCreateInfo.pNext = &extendedFeatures.rayTracingInvocationReorderFeatures; + + m_features.add("shader-execution-reorder"); + } + if (_hasAnySetBits( extendedFeatures.vulkan12Features, offsetof(VkPhysicalDeviceVulkan12Features, pNext) + sizeof(void*))) |
