spirv: Enable OpEmitMeshTasksEXT workaround for Clay Shader Compiler
authorCaio Oliveira <caio.oliveira@intel.com>
Thu, 29 Sep 2022 20:30:31 +0000 (13:30 -0700)
committerMarge Bot <emma+marge@anholt.net>
Sat, 1 Oct 2022 03:59:20 +0000 (03:59 +0000)
Clay Shader Compiler is the SPIR-V generator used by GravityMark benchmark.

Fixes #7368.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18894>

src/compiler/spirv/spirv_to_nir.c

index 58de196..7390490 100644 (file)
@@ -6389,9 +6389,13 @@ vtn_create_builder(const uint32_t *words, size_t word_count,
     * a terminator instruction.
     *
     * See https://github.com/KhronosGroup/glslang/issues/3020 for details.
+    *
+    * Clay Shader Compiler (used by GravityMark) is also affected.
     */
    b->wa_ignore_return_after_emit_mesh_tasks =
-      is_glslang(b) && generator_version < 11;
+      (is_glslang(b) && generator_version < 11) ||
+      (b->generator_id == vtn_generator_clay_shader_compiler &&
+       generator_version < 18);
 
    /* words[2] == generator magic */
    unsigned value_id_bound = words[3];