/* 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,
/* 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);
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,
/* 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);
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,