mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 15:30:09 +00:00
panfrost: Only write depth / stencil once if MRT is used
We can't assume that RT0 will be written, so this has to be based on
whether a combined store has already been emitted, not the location of
the store.
Emit a non-special combined_store intrinsic that only writes colour
for the other RTs, as reordering stores breaks the Midgard compiler.
Fixes: d37e901e35
("pan/mdg: Add new depth store lowering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6527
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685>
This commit is contained in:
parent
0a53ebabcd
commit
a4323b0979
@ -173,7 +173,12 @@ pan_nir_lower_zs_store(nir_shader *nir)
|
||||
nir_builder_init(&b, function->impl);
|
||||
b.cursor = nir_after_block_before_jump(instr->block);
|
||||
|
||||
pan_nir_emit_combined_store(&b, intr, writeout | PAN_WRITEOUT_C, stores);
|
||||
/* Trying to write depth twice results in the
|
||||
* wrong blend shader being executed on
|
||||
* Midgard */
|
||||
unsigned this_store = PAN_WRITEOUT_C | (replaced ? 0 : writeout);
|
||||
|
||||
pan_nir_emit_combined_store(&b, intr, this_store, stores);
|
||||
|
||||
nir_instr_remove(instr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user