anv: add support for INTEL_DEBUG=bat

As requested by Ken ;)

v2: Also decode simple batches (Caio)
    Fix u_vector usage issues (Lionel)

v3: Make binding/instruction/state/surface available (Lionel)

v4: Going through device pools for simple batches (Lionel)
    Centralize search BO callbacks into anv_device.c (Lionel)

v5: Clear decoded batch buffer var after use (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
Lionel Landwerlin
2019-02-23 23:27:17 +00:00
parent f1122f78b7
commit 32ffd90002
4 changed files with 93 additions and 2 deletions

View File

@@ -100,6 +100,9 @@ anv_device_submit_simple_batch(struct anv_device *device,
execbuf.rsvd1 = device->context_id;
execbuf.rsvd2 = 0;
if (unlikely(INTEL_DEBUG & DEBUG_BATCH))
gen_print_batch(&device->decoder_ctx, bo.map, bo.size, bo.offset);
result = anv_device_execbuf(device, &execbuf, exec_bos);
if (result != VK_SUCCESS)
goto fail;