From dbeca67a1de8eae7ab2edcf269352f84a9a10c00 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 27 Aug 2020 15:29:07 +0300 Subject: [PATCH] anv: don't disable KHR_performance_query in debug mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is useful to verify that queries are built properly and avoiding to deal with i915-perf (typically under simulation). v2: Remove likely() (Marcin) Signed-off-by: Lionel Landwerlin Reviewed-by: Marcin Ĺšlusarz Part-of: --- src/intel/vulkan/anv_extensions.py | 2 +- src/intel/vulkan/anv_perf.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py index 93aa2e406eb..b19dfcf6b77 100644 --- a/src/intel/vulkan/anv_extensions.py +++ b/src/intel/vulkan/anv_extensions.py @@ -90,7 +90,7 @@ EXTENSIONS = [ Extension('VK_KHR_multiview', 1, True), Extension('VK_KHR_performance_query', 1, 'device->use_softpin && device->perf && ' + - 'device->perf->i915_perf_version >= 3 && ' + + '(device->perf->i915_perf_version >= 3 || INTEL_DEBUG & DEBUG_NO_OACONFIG) && ' + 'device->use_call_secondary'), Extension('VK_KHR_pipeline_executable_properties', 1, True), Extension('VK_KHR_push_descriptor', 2, True), diff --git a/src/intel/vulkan/anv_perf.c b/src/intel/vulkan/anv_perf.c index ba6f677875e..91fcd6b1e53 100644 --- a/src/intel/vulkan/anv_perf.c +++ b/src/intel/vulkan/anv_perf.c @@ -56,8 +56,10 @@ anv_get_perf(const struct gen_device_info *devinfo, int fd) /* We need DRM_I915_PERF_PROP_HOLD_PREEMPTION support, only available in * perf revision 2. */ - if (perf->i915_perf_version < 3) - goto err; + if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) { + if (perf->i915_perf_version < 3) + goto err; + } return perf;