Mesa (master): anv: don't disable KHR_performance_query in debug mode

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 15 13:04:39 UTC 2021


Module: Mesa
Branch: master
Commit: dbeca67a1de8eae7ab2edcf269352f84a9a10c00
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbeca67a1de8eae7ab2edcf269352f84a9a10c00

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Thu Aug 27 15:29:07 2020 +0300

anv: don't disable KHR_performance_query in debug mode

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 <lionel.g.landwerlin at intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525>

---

 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;
 



More information about the mesa-commit mailing list