Add feature support check for VkPhysicalDeviceShaderDrawParametersFeatures Newer Vulkan CTS has started providing this extension structure during device creation. Bug: b/139528538 Change-Id: Ie5c72dcc0b96b4d9e98a06a36fdecbdb25304e49 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35250 Tested-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/libVulkan.cpp b/src/Vulkan/libVulkan.cpp index 09fdf3a..f2bbf2f 100644 --- a/src/Vulkan/libVulkan.cpp +++ b/src/Vulkan/libVulkan.cpp
@@ -519,6 +519,16 @@ } } break; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: + { + const VkPhysicalDeviceShaderDrawParametersFeatures* shaderDrawParametersFeatures = reinterpret_cast<const VkPhysicalDeviceShaderDrawParametersFeatures*>(extensionCreateInfo); + + if (shaderDrawParametersFeatures->shaderDrawParameters) + { + return VK_ERROR_FEATURE_NOT_PRESENT; + } + } + break; default: // "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]" UNIMPLEMENTED("extensionCreateInfo->sType %d", int(extensionCreateInfo->sType)); // TODO(b/119321052): UNIMPLEMENTED() should be used only for features that must still be implemented. Use a more informational macro here.