freedreno/a6xx: Emit GRAS_LRZ_MRT_BUF_INFO_0
Analogous to the previous commit, this fixes the case where turnip sets
this reg to a media (yuv) format and then a gallium job is run next.
Fixes: 9c895e13
("tu: Emit GRAS_LRZ_MRT_BUF_INFO_0")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13578>
This commit is contained in:
parent
98c1448509
commit
e6ae0e9b95
|
@ -79,6 +79,7 @@ emit_mrt(struct fd_ringbuffer *ring, struct pipe_framebuffer_state *pfb,
|
|||
unsigned i;
|
||||
|
||||
unsigned max_layer_index = 0;
|
||||
enum a6xx_format mrt0_format = 0;
|
||||
|
||||
for (i = 0; i < pfb->nr_cbufs; i++) {
|
||||
enum a3xx_color_swap swap = WZYX;
|
||||
|
@ -134,8 +135,13 @@ emit_mrt(struct fd_ringbuffer *ring, struct pipe_framebuffer_state *pfb,
|
|||
OUT_PKT4(ring, REG_A6XX_RB_MRT_FLAG_BUFFER(i), 3);
|
||||
fd6_emit_flag_reference(ring, rsc, psurf->u.tex.level,
|
||||
psurf->u.tex.first_layer);
|
||||
|
||||
if (i == 0)
|
||||
mrt0_format = format;
|
||||
}
|
||||
|
||||
OUT_REG(ring, A6XX_GRAS_LRZ_MRT_BUF_INFO_0(.color_format = mrt0_format));
|
||||
|
||||
OUT_REG(ring, A6XX_RB_SRGB_CNTL(.dword = srgb_cntl));
|
||||
OUT_REG(ring, A6XX_SP_SRGB_CNTL(.dword = srgb_cntl));
|
||||
|
||||
|
|
Loading…
Reference in New Issue