diff options
author | Lionel Landwerlin <[email protected]> | 2019-02-23 23:27:17 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-03-02 12:53:21 +0000 |
commit | 32ffd90002b04bff20a587e5d2f31fe79af1a4f2 (patch) | |
tree | b2da0fe62833ae74ca0d72434b4a2de444bad6a8 /src/intel/vulkan/anv_batch_chain.c | |
parent | f1122f78b765ecbb5702b5c2e2bf4a03fb83d778 (diff) |
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 <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_batch_chain.c')
-rw-r--r-- | src/intel/vulkan/anv_batch_chain.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index ff713d529af..9c7f96873a8 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -1729,10 +1729,20 @@ anv_cmd_buffer_execbuf(struct anv_device *device, } } - if (cmd_buffer) + if (cmd_buffer) { + if (unlikely(INTEL_DEBUG & DEBUG_BATCH)) { + struct anv_batch_bo **bo = u_vector_head(&cmd_buffer->seen_bbos); + + device->cmd_buffer_being_decoded = cmd_buffer; + gen_print_batch(&device->decoder_ctx, (*bo)->bo.map, + (*bo)->bo.size, (*bo)->bo.offset); + device->cmd_buffer_being_decoded = NULL; + } + result = setup_execbuf_for_cmd_buffer(&execbuf, cmd_buffer); - else + } else { result = setup_empty_execbuf(&execbuf, device); + } if (result != VK_SUCCESS) return result; |