diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 50683afe93e..2f9b05f889e 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -439,9 +439,9 @@ agx_emit_local_store_pixel(agx_builder *b, nir_intrinsic_instr *instr) 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); + agx_wait_pix(b, 0x0004); } else { - agx_writeout(b, 0x000C); + agx_wait_pix(b, 0x000C); } agx_write_sample_mask_1(b); @@ -472,7 +472,7 @@ agx_emit_store_zs(agx_builder *b, nir_intrinsic_instr *instr) /* TODO: Handle better */ assert(!b->shader->key->fs.ignore_tib_dependencies && "not used"); - agx_writeout(b, 0x0001); + agx_wait_pix(b, 0x0001); agx_index z = agx_src_index(&instr->src[1]); agx_index s = agx_src_index(&instr->src[2]); @@ -494,7 +494,7 @@ agx_emit_local_load_pixel(agx_builder *b, agx_index dest, { /* TODO: Reverse-engineer interactions with MRT */ assert(!b->shader->key->fs.ignore_tib_dependencies && "invalid usage"); - agx_writeout(b, 0x0008); + agx_wait_pix(b, 0x0008); b->shader->did_writeout = true; b->shader->out->reads_tib = true; @@ -664,7 +664,7 @@ static agx_instr * agx_emit_discard(agx_builder *b) { assert(!b->shader->key->fs.ignore_tib_dependencies && "invalid usage"); - agx_writeout(b, 0x0001); + agx_wait_pix(b, 0x0001); b->shader->did_writeout = true; b->shader->out->writes_sample_mask = true; diff --git a/src/asahi/compiler/agx_opcodes.py b/src/asahi/compiler/agx_opcodes.py index 49e14d3d752..08ece3bcfc2 100644 --- a/src/asahi/compiler/agx_opcodes.py +++ b/src/asahi/compiler/agx_opcodes.py @@ -328,7 +328,7 @@ op("st_vary", None, dests = 0, srcs = 2, can_eliminate = False) op("no_varyings", (0x80000051, 0xFFFFFFFF, 4, _), dests = 0, can_eliminate = False) op("stop", (0x88, 0xFFFF, 2, _), dests = 0, can_eliminate = False) op("trap", (0x08, 0xFFFF, 2, _), dests = 0, can_eliminate = False) -op("writeout", (0x48, 0xFF, 4, _), dests = 0, imms = [WRITEOUT], can_eliminate = False) +op("wait_pix", (0x48, 0xFF, 4, _), dests = 0, imms = [WRITEOUT], can_eliminate = False) # Sources are the image and the offset within shared memory # TODO: Do we need the short encoding?