summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIcecream95 <ixn@disroot.org>2022-05-24 16:30:54 +1200
committerDylan Baker <dylan.c.baker@intel.com>2022-05-26 09:10:36 -0700
commit34eb1f3066731a1a41304fe0e4376991bf108e97 (patch)
treea65abbc33ad23c4ea1c95b36379030db219d34cc
parent1020ddf8cd0df73d857307b8ae043a1ff7b751fc (diff)
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)
-rw-r--r--.pick_status.json2
-rw-r--r--src/panfrost/midgard/midgard_compile.c12
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