radv: enable VK_EXT_shader_viewport_index_layer
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 2 Apr 2018 16:17:55 +0000 (18:17 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 3 Apr 2018 12:05:46 +0000 (14:05 +0200)
The driver already supports exporting the Layer and ViewportIndex
built-ins from vertex or tessellation shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_extensions.py
src/amd/vulkan/radv_shader.c

index cbb02f138a13bb9a544a337d75082a90effceec3..8cb0b7aa7d5b262dc317f40de679f56f7c29dd50 100644 (file)
@@ -92,6 +92,7 @@ EXTENSIONS = [
     Extension('VK_EXT_external_memory_host',              1, 'device->rad_info.has_userptr'),
     Extension('VK_EXT_global_priority',                   1, 'device->rad_info.has_ctx_priority'),
     Extension('VK_EXT_sampler_filter_minmax',             1, 'device->rad_info.chip_class >= CIK'),
+    Extension('VK_EXT_shader_viewport_index_layer',       1, True),
     Extension('VK_AMD_draw_indirect_count',               1, True),
     Extension('VK_AMD_gcn_shader',                        1, True),
     Extension('VK_AMD_rasterization_order',               1, 'device->rad_info.chip_class >= VI && device->rad_info.max_se >= 2'),
index f150a20e3b37c4547bc3ee16b8b8cae505641b60..f46beab8c183a08b47f6ae7ae056de6cf323442b 100644 (file)
@@ -217,6 +217,7 @@ radv_shader_compile_to_nir(struct radv_device *device,
                                .variable_pointers = true,
                                .gcn_shader = true,
                                .trinary_minmax = true,
+                               .shader_viewport_index_layer = true,
                        },
                };
                entry_point = spirv_to_nir(spirv, module->size / 4,