[Mesa-dev] [PATCH v2 4/5] radv: Add support for VK_EXT_shader_viewport_index_layer extension.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Tue Aug 15 00:49:32 UTC 2017
We were using it internally already.
v2: Add support for the spirv capability.
---
src/amd/vulkan/radv_device.c | 4 ++++
src/amd/vulkan/radv_entrypoints_gen.py | 1 +
src/amd/vulkan/radv_pipeline.c | 1 +
3 files changed, 6 insertions(+)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 85ba165b4c6..473db513c87 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -168,6 +168,10 @@ static const VkExtensionProperties common_device_extensions[] = {
.extensionName = VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME,
.specVersion = 1,
},
+ {
+ .extensionName = VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME,
+ .specVersion = 1,
+ },
};
static const VkExtensionProperties ext_sema_device_extensions[] = {
{
diff --git a/src/amd/vulkan/radv_entrypoints_gen.py b/src/amd/vulkan/radv_entrypoints_gen.py
index 9634f76fcd6..0411524d38c 100644
--- a/src/amd/vulkan/radv_entrypoints_gen.py
+++ b/src/amd/vulkan/radv_entrypoints_gen.py
@@ -57,6 +57,7 @@ SUPPORTED_EXTENSIONS = [
'VK_KHR_external_semaphore_capabilities',
'VK_KHR_external_semaphore',
'VK_KHR_external_semaphore_fd',
+ 'VK_EXT_shader_viewport_index_layer',
]
# We generate a static hash table for entry point lookup
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index bd5eeb776c4..75b5ac5525f 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -231,6 +231,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
.tessellation = true,
.int64 = true,
.variable_pointers = true,
+ .vs_tes_viewport_layer = true,
};
entry_point = spirv_to_nir(spirv, module->size / 4,
spec_entries, num_spec_entries,
--
2.14.1
More information about the mesa-dev
mailing list