mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 22:18:13 +02:00
asahi: Handle non-written RTs correctly
When a bound RT is not written to, we need to force the pass type to
translucent to ensure that this draw does not cull draws that do write
to that RT.
Fixes Inochi2D regression after c24b753378.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
This commit is contained in:
parent
0f4e3a03fd
commit
f1fedb72d3
1 changed files with 10 additions and 0 deletions
|
|
@ -1572,6 +1572,16 @@ agx_compile_variant(struct agx_device *dev, struct agx_uncompiled_shader *so,
|
|||
} else {
|
||||
colormasks[i] = BITFIELD_MASK(4);
|
||||
}
|
||||
|
||||
/* If not all bound RTs are fully written to, we need to force
|
||||
* translucent pass type. agx_nir_lower_tilebuffer will take
|
||||
* care of this for its own colormasks input.
|
||||
*/
|
||||
unsigned comps = util_format_get_nr_components(key->rt_formats[i]);
|
||||
if (i < key->nr_cbufs &&
|
||||
(opts.rt[i].colormask & BITFIELD_MASK(comps)) !=
|
||||
BITFIELD_MASK(comps))
|
||||
force_translucent = true;
|
||||
}
|
||||
|
||||
/* Clip plane lowering creates discard instructions, so run that before
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue