From 53df6dfb5baea9941167492d05c7f39ef0fafa8d Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 18 May 2022 15:32:09 +1000 Subject: [PATCH] lima: lower all undefs to zero in vs Otherwise we will later hit: gpir_error("nir_ssa_undef_instr is not supported\n"); Unfortunatly this causes a piglit failure due to increased register pressure in an unrealistic shader but since not doing this can result in hitting the not supported error in more relistic shaders this seems the right thing to do for now. Reviewed-by: Emma Anholt Part-of: --- src/gallium/drivers/lima/ci/lima-fails.txt | 1 + src/gallium/drivers/lima/lima_program.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/drivers/lima/ci/lima-fails.txt b/src/gallium/drivers/lima/ci/lima-fails.txt index 58035199bc7..8cc9dffab87 100644 --- a/src/gallium/drivers/lima/ci/lima-fails.txt +++ b/src/gallium/drivers/lima/ci/lima-fails.txt @@ -388,6 +388,7 @@ spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d-clamp-z,Fail spec@glsl-1.10@execution@samplers@glsl-fs-shadow2d,Fail spec@glsl-1.10@execution@samplers@glsl-fs-shadow2dproj-bias,Fail spec@glsl-1.10@execution@samplers@glsl-fs-shadow2dproj,Fail +spec@glsl-1.10@execution@temp-array-indexing@glsl-vs-giant-temp-array,Fail spec@glsl-1.10@execution@variable-indexing@fs-temp-array-mat2-col-row-wr,Fail spec@glsl-1.10@execution@variable-indexing@fs-temp-array-mat2-col-wr,Fail spec@glsl-1.10@execution@variable-indexing@fs-temp-array-mat2-index-col-row-wr,Fail diff --git a/src/gallium/drivers/lima/lima_program.c b/src/gallium/drivers/lima/lima_program.c index f28eac5081c..9e43db13ea7 100644 --- a/src/gallium/drivers/lima/lima_program.c +++ b/src/gallium/drivers/lima/lima_program.c @@ -138,6 +138,7 @@ lima_program_optimize_vs_nir(struct nir_shader *s) NIR_PASS(progress, s, nir_opt_constant_folding); NIR_PASS(progress, s, nir_opt_undef); NIR_PASS(progress, s, nir_opt_loop_unroll); + NIR_PASS(progress, s, nir_lower_undef_to_zero); } while (progress); NIR_PASS_V(s, nir_lower_int_to_float);