diff options
author | Rob Clark <[email protected]> | 2019-03-21 15:57:06 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-03-22 08:53:28 -0400 |
commit | bf5a92811d5564f0d4f7a83814e3965170b823f0 (patch) | |
tree | 679fd0261ef040c13be6cfadb77ef9185a7227a2 /src | |
parent | dbac1a80d1688e500d653afd859f4c84290b1fe5 (diff) |
freedreno/ir3: disable early-z for SSBO/image writes
Fixes:
dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_depth
dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_stencil
dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_depth_fbo
dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_stencil_fbo
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/freedreno/ir3/ir3_compiler_nir.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index f7a68627a4c..402da13792b 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -1202,6 +1202,9 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) ctx->funcs->emit_intrinsic_load_ssbo(ctx, intr, dst); break; case nir_intrinsic_store_ssbo_ir3: + if ((ctx->so->type == MESA_SHADER_FRAGMENT) && + !ctx->s->info.fs.early_fragment_tests) + ctx->so->no_earlyz = true; ctx->funcs->emit_intrinsic_store_ssbo(ctx, intr); break; case nir_intrinsic_get_buffer_size: @@ -1217,6 +1220,9 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) case nir_intrinsic_ssbo_atomic_xor_ir3: case nir_intrinsic_ssbo_atomic_exchange_ir3: case nir_intrinsic_ssbo_atomic_comp_swap_ir3: + if ((ctx->so->type == MESA_SHADER_FRAGMENT) && + !ctx->s->info.fs.early_fragment_tests) + ctx->so->no_earlyz = true; dst[0] = ctx->funcs->emit_intrinsic_atomic_ssbo(ctx, intr); break; case nir_intrinsic_load_shared: @@ -1241,6 +1247,9 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) emit_intrinsic_load_image(ctx, intr, dst); break; case nir_intrinsic_image_deref_store: + if ((ctx->so->type == MESA_SHADER_FRAGMENT) && + !ctx->s->info.fs.early_fragment_tests) + ctx->so->no_earlyz = true; ctx->funcs->emit_intrinsic_store_image(ctx, intr); break; case nir_intrinsic_image_deref_size: @@ -1254,6 +1263,9 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) case nir_intrinsic_image_deref_atomic_xor: case nir_intrinsic_image_deref_atomic_exchange: case nir_intrinsic_image_deref_atomic_comp_swap: + if ((ctx->so->type == MESA_SHADER_FRAGMENT) && + !ctx->s->info.fs.early_fragment_tests) + ctx->so->no_earlyz = true; dst[0] = ctx->funcs->emit_intrinsic_atomic_image(ctx, intr); break; case nir_intrinsic_barrier: |