summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-10-02 15:39:34 -0700
committerGitHub <noreply@github.com>2023-10-02 15:39:34 -0700
commitd87493a46c00be37b820a473c0827bbb865eb222 (patch)
tree33155e6be017238e07314f7793423dd50b748150 /tools
parentcea230bc686ef87db4cff47e367bbf824b90377d (diff)
More direct-SPIRV fixes. (#3257)
* More direct-SPIRV fixes. * Fix array-reg-to-mem. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/vulkan/vk-api.h3
-rw-r--r--tools/gfx/vulkan/vk-device.cpp14
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*)))