summaryrefslogtreecommitdiffstats
path: root/tools/gfx
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2024-04-28 22:34:02 -0400
committerGitHub <noreply@github.com>2024-04-28 22:34:02 -0400
commit30b82abc37fd512efb12632da21bed3654d594a8 (patch)
tree0570ea0c14e5ca693c8e923a61793f64ce642f33 /tools/gfx
parent2b87c00c671b156b8e5926f8967003bf12c65aa7 (diff)
Add variable pointers to render-test-vk and a related failing test-case (#4041)
* add variable pointers to render-test-vk and failing (but ignored with workarounds) test-case
Diffstat (limited to 'tools/gfx')
-rw-r--r--tools/gfx/vulkan/vk-api.h4
-rw-r--r--tools/gfx/vulkan/vk-device.cpp11
2 files changed, 15 insertions, 0 deletions
diff --git a/tools/gfx/vulkan/vk-api.h b/tools/gfx/vulkan/vk-api.h
index cceac20e1..04d9d066f 100644
--- a/tools/gfx/vulkan/vk-api.h
+++ b/tools/gfx/vulkan/vk-api.h
@@ -283,6 +283,10 @@ struct VulkanExtendedFeatureProperties
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV
};
+ VkPhysicalDeviceVariablePointerFeaturesKHR variablePointersFeatures = {
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR
+ };
+
// 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 dd8a674cb..aac7631cb 100644
--- a/tools/gfx/vulkan/vk-device.cpp
+++ b/tools/gfx/vulkan/vk-device.cpp
@@ -460,6 +460,10 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
extendedFeatures.accelerationStructureFeatures.pNext = deviceFeatures2.pNext;
deviceFeatures2.pNext = &extendedFeatures.accelerationStructureFeatures;
+ // Variable pointer features.
+ extendedFeatures.variablePointersFeatures.pNext = deviceFeatures2.pNext;
+ deviceFeatures2.pNext = &extendedFeatures.variablePointersFeatures;
+
// Extended dynamic states
extendedFeatures.extendedDynamicStateFeatures.pNext = deviceFeatures2.pNext;
deviceFeatures2.pNext = &extendedFeatures.extendedDynamicStateFeatures;
@@ -675,6 +679,13 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
"shader-execution-reorder"
);
+ SIMPLE_EXTENSION_FEATURE(
+ extendedFeatures.variablePointersFeatures,
+ variablePointers,
+ VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME,
+ "variable-pointer"
+ );
+
#undef SIMPLE_EXTENSION_FEATURE
if (extendedFeatures.vulkan12Features.shaderBufferInt64Atomics)