mirror of https://gitlab.freedesktop.org/mesa/mesa
agx: Condition writeout ops on already being emitted
There's a lot of r/e waiting here, but will be needed for ld_tile. Match the Metal blob. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>
This commit is contained in:
parent
41d8db33a2
commit
1b9b2f9046
|
@ -172,9 +172,14 @@ agx_emit_fragment_out(agx_builder *b, nir_intrinsic_instr *instr)
|
|||
unsigned rt = (loc - FRAG_RESULT_DATA0);
|
||||
|
||||
/* TODO: Reverse-engineer interactions with MRT */
|
||||
agx_writeout(b, 0xC200);
|
||||
agx_writeout(b, 0x000C);
|
||||
if (b->shader->did_writeout) {
|
||||
agx_writeout(b, 0x0004);
|
||||
} else {
|
||||
agx_writeout(b, 0xC200);
|
||||
agx_writeout(b, 0x000C);
|
||||
}
|
||||
|
||||
b->shader->did_writeout = true;
|
||||
return agx_st_tile(b, agx_src_index(&instr->src[0]),
|
||||
b->shader->key->fs.tib_formats[rt]);
|
||||
}
|
||||
|
|
|
@ -318,6 +318,9 @@ typedef struct {
|
|||
/* For creating temporaries */
|
||||
unsigned alloc;
|
||||
|
||||
/* I don't really understand how writeout ops work yet */
|
||||
bool did_writeout;
|
||||
|
||||
/* Stats for shader-db */
|
||||
unsigned loop_count;
|
||||
unsigned spills;
|
||||
|
|
Loading…
Reference in New Issue