agx: Fix tib access in internal shaders
The only case where tilebuffer access can be specially optimized is the st_tile used in internal clear (or reload) shaders. However, other shaders (like those used with u_blitter) may have nir->info.internal set, so we can't key off that. Instead, add a special key for this optimization to ensure correctness with other internal shaders. Fixes flaky tests in dEQP-GLES2.functional.color_clear.* Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
This commit is contained in:

committed by
Marge Bot

parent
a03ce740bb
commit
9645e46a53
@@ -430,8 +430,8 @@ agx_emit_fragment_out(agx_builder *b, nir_intrinsic_instr *instr)
|
||||
unsigned rt = (loc - FRAG_RESULT_DATA0);
|
||||
|
||||
/* TODO: Reverse-engineer interactions with MRT */
|
||||
if (b->shader->nir->info.internal) {
|
||||
/* clear */
|
||||
if (b->shader->key->fs.ignore_tib_dependencies) {
|
||||
assert(b->shader->nir->info.internal && "only for clear shaders");
|
||||
} else if (b->shader->did_writeout) {
|
||||
agx_writeout(b, 0x0004);
|
||||
} else {
|
||||
@@ -467,6 +467,7 @@ agx_emit_load_tile(agx_builder *b, agx_index *dests, nir_intrinsic_instr *instr)
|
||||
unsigned rt = (loc - FRAG_RESULT_DATA0);
|
||||
|
||||
/* TODO: Reverse-engineer interactions with MRT */
|
||||
assert(!b->shader->key->fs.ignore_tib_dependencies && "invalid usage");
|
||||
agx_writeout(b, 0xC200);
|
||||
agx_writeout(b, 0x0008);
|
||||
b->shader->did_writeout = true;
|
||||
@@ -563,6 +564,7 @@ agx_blend_const(agx_builder *b, agx_index dst, unsigned comp)
|
||||
static agx_instr *
|
||||
agx_emit_discard(agx_builder *b, nir_intrinsic_instr *instr)
|
||||
{
|
||||
assert(!b->shader->key->fs.ignore_tib_dependencies && "invalid usage");
|
||||
agx_writeout(b, 0xC200);
|
||||
agx_writeout(b, 0x0001);
|
||||
b->shader->did_writeout = true;
|
||||
|
Reference in New Issue
Block a user