Mesa (staging/22.0): pan/mdg: Read base for combined stores
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 26 16:40:23 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: 34eb1f3066731a1a41304fe0e4376991bf108e97
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=34eb1f3066731a1a41304fe0e4376991bf108e97
Author: Icecream95 <ixn at disroot.org>
Date: Tue May 24 16:30:54 2022 +1200
pan/mdg: Read base for combined stores
Fixes depth/stencil writes with MRT.
Fixes: b3d72727537 ("pan/mdg: Don't read base for combined stores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685>
(cherry picked from commit 0a53ebabcdd811b045eb24d2977b31de5cf4782e)
---
.pick_status.json | 2 +-
src/panfrost/midgard/midgard_compile.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 0337cf602c7..ed34d9e6782 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -572,7 +572,7 @@
"description": "pan/mdg: Read base for combined stores",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"because_sha": "b3d72727537ff1b40323148ac040f84cdbb575c1"
},
{
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index a40d1a594cb..daa2224b29b 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -1875,20 +1875,18 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
enum midgard_rt_id rt;
unsigned reg_z = ~0, reg_s = ~0, reg_2 = ~0;
+ unsigned writeout = PAN_WRITEOUT_C;
if (combined) {
- unsigned writeout = nir_intrinsic_component(instr);
+ writeout = nir_intrinsic_component(instr);
if (writeout & PAN_WRITEOUT_Z)
reg_z = nir_src_index(ctx, &instr->src[2]);
if (writeout & PAN_WRITEOUT_S)
reg_s = nir_src_index(ctx, &instr->src[3]);
if (writeout & PAN_WRITEOUT_2)
reg_2 = nir_src_index(ctx, &instr->src[4]);
+ }
- if (writeout & PAN_WRITEOUT_C)
- rt = MIDGARD_COLOR_RT0;
- else
- rt = MIDGARD_ZS_RT;
- } else {
+ if (writeout & PAN_WRITEOUT_C) {
const nir_variable *var =
nir_find_variable_with_driver_location(ctx->nir, nir_var_shader_out,
nir_intrinsic_base(instr));
@@ -1898,6 +1896,8 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
rt = MIDGARD_COLOR_RT0 + var->data.location -
FRAG_RESULT_DATA0;
+ } else {
+ rt = MIDGARD_ZS_RT;
}
/* Dual-source blend writeout is done by leaving the
More information about the mesa-commit
mailing list