[Mesa-dev] [PATCH 3/3] radv: Enable VK_KHR_shader_draw_parameters.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Tue Jan 31 20:42:12 UTC 2017


Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
---
 src/amd/vulkan/radv_device.c   | 4 ++++
 src/amd/vulkan/radv_pipeline.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index da67b65ef43..0c8af823263 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -124,6 +124,10 @@ static const VkExtensionProperties common_device_extensions[] = {
 		.extensionName = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
 		.specVersion = 1,
 	},
+	{
+		.extensionName = VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME,
+		.specVersion = 1,
+	},
 };
 
 static VkResult
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 279a0767efd..99c4c8ae6eb 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -207,6 +207,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
 			}
 		}
 		const struct nir_spirv_supported_extensions supported_ext = {
+			.draw_parameters = true
 		};
 		entry_point = spirv_to_nir(spirv, module->size / 4,
 					   spec_entries, num_spec_entries,
-- 
2.11.0



More information about the mesa-dev mailing list