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:
@@ -172,9 +172,14 @@ agx_emit_fragment_out(agx_builder *b, nir_intrinsic_instr *instr)
|
|||||||
unsigned rt = (loc - FRAG_RESULT_DATA0);
|
unsigned rt = (loc - FRAG_RESULT_DATA0);
|
||||||
|
|
||||||
/* TODO: Reverse-engineer interactions with MRT */
|
/* TODO: Reverse-engineer interactions with MRT */
|
||||||
agx_writeout(b, 0xC200);
|
if (b->shader->did_writeout) {
|
||||||
agx_writeout(b, 0x000C);
|
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]),
|
return agx_st_tile(b, agx_src_index(&instr->src[0]),
|
||||||
b->shader->key->fs.tib_formats[rt]);
|
b->shader->key->fs.tib_formats[rt]);
|
||||||
}
|
}
|
||||||
|
@@ -318,6 +318,9 @@ typedef struct {
|
|||||||
/* For creating temporaries */
|
/* For creating temporaries */
|
||||||
unsigned alloc;
|
unsigned alloc;
|
||||||
|
|
||||||
|
/* I don't really understand how writeout ops work yet */
|
||||||
|
bool did_writeout;
|
||||||
|
|
||||||
/* Stats for shader-db */
|
/* Stats for shader-db */
|
||||||
unsigned loop_count;
|
unsigned loop_count;
|
||||||
unsigned spills;
|
unsigned spills;
|
||||||
|
Reference in New Issue
Block a user