aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2019-06-12 12:41:36 +0300
committerJuan A. Suarez Romero <jasuarez@igalia.com>2019-06-14 08:54:08 +0000
commit94e222849626d3555bce00b25047c0603ef8206b (patch)
treec02e5a0a3452a4f68e74b9b7f4d586743632c308
parent5eccd8fa5a88a972d271c619bb557dac87ec4405 (diff)
anv: do not parse genxml data without INTEL_DEBUG=bat
This significantly slows down the CTS runs. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: 32ffd90002b04b ("anv: add support for INTEL_DEBUG=bat") Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> (cherry picked from commit 93b93e5a9da31b3f7d722029e23609d8a187bf01)
-rw-r--r--src/intel/vulkan/anv_device.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 7145646e1de..132ccc9f375 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -2151,16 +2151,18 @@ VkResult anv_CreateDevice(
if (!device)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
- const unsigned decode_flags =
- GEN_BATCH_DECODE_FULL |
- ((INTEL_DEBUG & DEBUG_COLOR) ? GEN_BATCH_DECODE_IN_COLOR : 0) |
- GEN_BATCH_DECODE_OFFSETS |
- GEN_BATCH_DECODE_FLOATS;
+ if (INTEL_DEBUG & DEBUG_BATCH) {
+ const unsigned decode_flags =
+ GEN_BATCH_DECODE_FULL |
+ ((INTEL_DEBUG & DEBUG_COLOR) ? GEN_BATCH_DECODE_IN_COLOR : 0) |
+ GEN_BATCH_DECODE_OFFSETS |
+ GEN_BATCH_DECODE_FLOATS;
- gen_batch_decode_ctx_init(&device->decoder_ctx,
- &physical_device->info,
- stderr, decode_flags, NULL,
- decode_get_bo, NULL, device);
+ gen_batch_decode_ctx_init(&device->decoder_ctx,
+ &physical_device->info,
+ stderr, decode_flags, NULL,
+ decode_get_bo, NULL, device);
+ }
device->_loader_data.loaderMagic = ICD_LOADER_MAGIC;
device->instance = physical_device->instance;
@@ -2443,7 +2445,8 @@ void anv_DestroyDevice(
anv_gem_destroy_context(device, device->context_id);
- gen_batch_decode_ctx_finish(&device->decoder_ctx);
+ if (INTEL_DEBUG & DEBUG_BATCH)
+ gen_batch_decode_ctx_finish(&device->decoder_ctx);
close(device->fd);