diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 304763114a9..b53a6eabf26 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -510,10 +510,14 @@ agx_flush(struct pipe_context *pctx, /* Size calculation should've been exact */ assert(handle_i == handle_count); + unsigned cmdbuf_id = 0xDEADBEEF; + unsigned encoder_id = 0xCAFECAFE; + unsigned cmdbuf_size = demo_cmdbuf(dev->cmdbuf.ptr.cpu, dev->cmdbuf.size, &ctx->batch->pool, ctx->batch->encoder->ptr.gpu, + encoder_id, ctx->batch->scissor.bo->ptr.gpu, ctx->batch->width, ctx->batch->height, @@ -525,7 +529,7 @@ agx_flush(struct pipe_context *pctx, /* Generate the mapping table from the BO list */ demo_mem_map(dev->memmap.ptr.cpu, dev->memmap.size, handles, handle_count, - 0xDEADBEEF, 0xCAFECAFE, cmdbuf_size); + cmdbuf_id, encoder_id, cmdbuf_size); free(handles); diff --git a/src/gallium/drivers/asahi/magic.c b/src/gallium/drivers/asahi/magic.c index 6d4b75f7bf8..91300cd6e35 100644 --- a/src/gallium/drivers/asahi/magic.c +++ b/src/gallium/drivers/asahi/magic.c @@ -79,6 +79,7 @@ unsigned demo_cmdbuf(uint64_t *buf, size_t size, struct agx_pool *pool, uint64_t encoder_ptr, + uint64_t encoder_id, uint64_t scissor_ptr, unsigned width, unsigned height, uint32_t pipeline_null, @@ -186,7 +187,7 @@ demo_cmdbuf(uint64_t *buf, size_t size, /* Compare compute case ,which has a bit of reordering, but we can swap */ EMIT32(cmdbuf, 0x1c); // 0x5a0 EMIT32(cmdbuf, 0); - EMIT64(cmdbuf, 0xCAFECAFE); // encoder ID XXX: don't fix + EMIT64(cmdbuf, encoder_id); EMIT32(cmdbuf, 0); EMIT32(cmdbuf, 0xffffffff); diff --git a/src/gallium/drivers/asahi/magic.h b/src/gallium/drivers/asahi/magic.h index 429e7e232da..98215d367c9 100644 --- a/src/gallium/drivers/asahi/magic.h +++ b/src/gallium/drivers/asahi/magic.h @@ -28,6 +28,7 @@ unsigned demo_cmdbuf(uint64_t *buf, size_t size, struct agx_pool *pool, uint64_t encoder_ptr, + uint64_t encoder_id, uint64_t scissor_ptr, unsigned width, unsigned height, uint32_t pipeline_null,