From 0ab01f42156411637d2f3aeba48132c259ef4c02 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 20 May 2021 18:26:55 +0200 Subject: [PATCH] ir3: Call nir_lower_wrmask() again after lowering scratch I forgot that after rebasing on large_consts support that this is now called after the first time nir_lower_wrmask is called and can generate partial writemasks that need to be lowered. While we're here, also call the main optimization loop if things are lowered to scratch because it generates address arithmetic that may need to be cleaned up. Part-of: --- src/freedreno/ir3/ir3_nir.c | 7 +++++-- .../drivers/freedreno/ci/piglit-freedreno-a630-fails.txt | 5 +---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 874d9302571..c8d0a0b31f0 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -553,10 +553,13 @@ ir3_nir_lower_variant(struct ir3_shader_variant *so, nir_shader *s) * expensive. */ if (so->shader->compiler->has_pvtmem) { - NIR_PASS_V(s, nir_lower_vars_to_scratch, nir_var_function_temp, - 16 * 16 /* bytes */, glsl_get_natural_size_align_bytes); + progress |= + OPT(s, nir_lower_vars_to_scratch, nir_var_function_temp, + 16 * 16 /* bytes */, glsl_get_natural_size_align_bytes); } + /* Lower scratch writemasks */ + progress |= OPT(s, nir_lower_wrmasks, should_split_wrmask, s); OPT_V(s, nir_lower_amul, ir3_glsl_type_size); diff --git a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt index ebe15bb8206..5c4d78e0164 100644 --- a/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt +++ b/src/gallium/drivers/freedreno/ci/piglit-freedreno-a630-fails.txt @@ -482,9 +482,6 @@ spec@arb_tessellation_shader@execution@vs-tes-max-in-out-components,Fail spec@arb_tessellation_shader@execution@vs-tes-tessinner-tessouter-inputs-quads,Fail spec@arb_tessellation_shader@execution@vs-tes-tessinner-tessouter-inputs-tris,Fail spec@arb_tessellation_shader@execution@vs-tes-vertex,Fail -spec@glsl-1.30@execution@fs-large-local-array-vec2,Crash -spec@glsl-1.30@execution@fs-large-local-array-vec3,Crash -spec@glsl-1.30@execution@fs-large-local-array-vec4,Crash spec@glsl-1.50@execution@compatibility@clipping@gs-clip-vertex-const-accept,Fail spec@glsl-1.50@execution@compatibility@clipping@gs-clip-vertex-different-from-position,Fail spec@glsl-1.50@execution@compatibility@clipping@gs-clip-vertex-enables,Fail @@ -512,7 +509,7 @@ spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip,Fail spec@glsl-1.50@execution@primitive-id-no-gs-quads,Fail spec@glsl-1.50@execution@variable-indexing@gs-input-array-float-index-rd,Fail spec@glsl-1.50@execution@variable-indexing@gs-input-array-vec2-index-rd,Fail -spec@glsl-1.50@execution@variable-indexing@gs-input-array-vec3-index-rd,Crash +spec@glsl-1.50@execution@variable-indexing@gs-input-array-vec3-index-rd,Fail spec@glsl-1.50@execution@variable-indexing@gs-output-array-vec3-index-wr,Fail spec@glsl-1.50@execution@variable-indexing@gs-output-array-vec4-index-wr,Crash spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec3-index-wr-before-gs,Fail