turnip: lower device index to zero
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Thu, 11 Mar 2021 10:35:31 +0000 (12:35 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Mar 2021 21:12:52 +0000 (21:12 +0000)
Vulkan 1.1 has VK_KHR_device_group and VK_KHR_device_group_creation
promoted to core, thus we should handle DeviceIndex built-in.

While we are here, also add these extensions to the extensions list,
even though they are not doing anything useful.

Fixes test:
 dEQP-VK.compute.device_group.device_index

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9516>

src/freedreno/ir3/ir3_nir.c
src/freedreno/vulkan/tu_extensions.py
src/freedreno/vulkan/tu_shader.c

index e26ef57..40fbf1d 100644 (file)
@@ -139,6 +139,7 @@ static const nir_shader_compiler_options options_a6xx = {
                 */
                .lower_int64_options = (nir_lower_int64_options)~0,
                .lower_uniforms_to_ubo = true,
+               .lower_device_index_to_zero = true,
 };
 
 const nir_shader_compiler_options *
index 63cb3b8..5bda404 100644 (file)
@@ -103,6 +103,8 @@ EXTENSIONS = [
     Extension('VK_KHR_depth_stencil_resolve',             1, True),
     Extension('VK_KHR_performance_query',                 1, 'device->instance->debug_flags & TU_DEBUG_PERFC'),
     Extension('VK_EXT_memory_budget',                     1, True),
+    Extension('VK_KHR_device_group',                      4, True),
+    Extension('VK_KHR_device_group_creation',             1, True),
 ]
 
 MAX_API_VERSION = VkVersion(MAX_API_VERSION)
index 7a286e9..28d00fa 100644 (file)
@@ -68,6 +68,7 @@ tu_spirv_to_nir(struct tu_device *dev,
          .multiview = true,
          .shader_viewport_index_layer = true,
          .geometry_streams = true,
+         .device_group = true,
       },
    };
    const nir_shader_compiler_options *nir_options =