mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 21:50:34 +01:00
pan/bi: Read base for combined stores
Fixes depth/stencil writes with MRT. Fixes:996645e479("pan/bi: Don't read base for combined stores") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685> (cherry picked from commitf1a226dd24)
This commit is contained in:
parent
78cc3737f3
commit
dc5ec1899f
2 changed files with 6 additions and 11 deletions
|
|
@ -652,7 +652,7 @@
|
|||
"description": "pan/bi: Read base for combined stores",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "996645e4794acc84537b6b69680acfc46620bbcb"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -653,16 +653,11 @@ bi_emit_fragment_out(bi_builder *b, nir_intrinsic_instr *instr)
|
|||
bool emit_blend = writeout & (PAN_WRITEOUT_C);
|
||||
bool emit_zs = writeout & (PAN_WRITEOUT_Z | PAN_WRITEOUT_S);
|
||||
|
||||
unsigned loc = ~0;
|
||||
const nir_variable *var =
|
||||
nir_find_variable_with_driver_location(b->shader->nir,
|
||||
nir_var_shader_out, nir_intrinsic_base(instr));
|
||||
|
||||
if (!combined) {
|
||||
const nir_variable *var =
|
||||
nir_find_variable_with_driver_location(b->shader->nir,
|
||||
nir_var_shader_out, nir_intrinsic_base(instr));
|
||||
assert(var);
|
||||
|
||||
loc = var->data.location;
|
||||
}
|
||||
unsigned loc = var ? var->data.location : 0;
|
||||
|
||||
bi_index src0 = bi_src_index(&instr->src[0]);
|
||||
|
||||
|
|
@ -712,7 +707,7 @@ bi_emit_fragment_out(bi_builder *b, nir_intrinsic_instr *instr)
|
|||
}
|
||||
|
||||
if (emit_blend) {
|
||||
unsigned rt = combined ? 0 : (loc - FRAG_RESULT_DATA0);
|
||||
unsigned rt = loc ? (loc - FRAG_RESULT_DATA0) : 0;
|
||||
bool dual = (writeout & PAN_WRITEOUT_2);
|
||||
bi_index color = bi_src_index(&instr->src[0]);
|
||||
bi_index color2 = dual ? bi_src_index(&instr->src[4]) : bi_null();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue