diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 2f9b05f889e..ffabb08777d 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -423,6 +423,7 @@ agx_write_sample_mask_1(agx_builder *b) * TODO: interactions with MSAA and gl_SampleMask writes */ agx_sample_mask(b, agx_immediate(1)); + agx_signal_pix(b, 1); b->shader->did_sample_mask = true; assert(!(b->shader->nir->info.outputs_written & @@ -668,7 +669,8 @@ agx_emit_discard(agx_builder *b) b->shader->did_writeout = true; b->shader->out->writes_sample_mask = true; - return agx_sample_mask(b, agx_immediate(0)); + agx_sample_mask(b, agx_immediate(0)); + return agx_signal_pix(b, 1); } static agx_instr * diff --git a/src/asahi/compiler/agx_opcodes.py b/src/asahi/compiler/agx_opcodes.py index 08ece3bcfc2..e6f685abf82 100644 --- a/src/asahi/compiler/agx_opcodes.py +++ b/src/asahi/compiler/agx_opcodes.py @@ -329,6 +329,7 @@ op("no_varyings", (0x80000051, 0xFFFFFFFF, 4, _), dests = 0, can_eliminate = Fal op("stop", (0x88, 0xFFFF, 2, _), dests = 0, can_eliminate = False) op("trap", (0x08, 0xFFFF, 2, _), dests = 0, can_eliminate = False) op("wait_pix", (0x48, 0xFF, 4, _), dests = 0, imms = [WRITEOUT], can_eliminate = False) +op("signal_pix", (0x58, 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? diff --git a/src/asahi/compiler/agx_pack.c b/src/asahi/compiler/agx_pack.c index 3f81059bd5a..4df255fdc09 100644 --- a/src/asahi/compiler/agx_pack.c +++ b/src/asahi/compiler/agx_pack.c @@ -508,19 +508,6 @@ agx_pack_instr(struct util_dynarray *emission, struct util_dynarray *fixups, unsigned size = 4; memcpy(util_dynarray_grow_bytes(emission, 1, size), &raw, size); - - { - /* This is actually a separate instruction. - * - * signal_pix 1, 0 - * - * We don't model this correctly yet, but we should. - */ - uint32_t raw = 0x158; - unsigned size = 4; - memcpy(util_dynarray_grow_bytes(emission, 1, size), &raw, size); - } - break; }