From 7f2ce867cf0e13a1dfb005ceb79f359a9bb3cc4d Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Tue, 29 Nov 2022 12:49:24 +0100 Subject: [PATCH] tu: fix load_helper_invocation not being lowered nir_lower_is_helper_invocation should be after nir_lower_system_values to handle possible nir_intrinsic_is_helper_invocation which may be produced by nir_lower_system_values. Happens with SPIR-V 1.6 for which gl_HelperInvocation is translated into "BuiltIn HelperInvocation" + "Volatile", which nir_lower_system_values translates into is_helper_invocation. Signed-off-by: Danylo Piliaiev Reviewed-by: Emma Anholt Part-of: --- src/freedreno/vulkan/tu_shader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 2ee168298cc..ce8a6e3bd59 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -120,9 +120,8 @@ tu_spirv_to_nir(struct tu_device *dev, NIR_PASS_V(nir, nir_opt_copy_prop_vars); NIR_PASS_V(nir, nir_opt_combine_stores, nir_var_all); - NIR_PASS_V(nir, nir_lower_is_helper_invocation); - NIR_PASS_V(nir, nir_lower_system_values); + NIR_PASS_V(nir, nir_lower_is_helper_invocation); NIR_PASS_V(nir, nir_lower_frexp);