mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 13:10:25 +01:00
pan/mdg: Read base for combined stores
Fixes depth/stencil writes with MRT. Fixes:b3d7272753("pan/mdg: Don't read base for combined stores") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685> (cherry picked from commit0a53ebabcd)
This commit is contained in:
parent
dc5ec1899f
commit
0155e7a136
2 changed files with 7 additions and 7 deletions
|
|
@ -643,7 +643,7 @@
|
|||
"description": "pan/mdg: Read base for combined stores",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "b3d72727537ff1b40323148ac040f84cdbb575c1"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1955,20 +1955,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));
|
||||
|
|
@ -1978,6 +1976,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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue