asahi: Allow specifying an encoder ID
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11815>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user