Mesa (staging/20.0): anv: don't expose VK_INTEL_performance_query without kernel support

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 11 17:22:55 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 299d0f9a81573e5e11e31961d7b62e86ddf2f706
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=299d0f9a81573e5e11e31961d7b62e86ddf2f706

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Thu May  7 11:36:36 2020 +0300

anv: don't expose VK_INTEL_performance_query without kernel support

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: 2b5f30b1d91b ("anv: implement VK_INTEL_performance_query")
Acked-by: Timothy Strelchun <timothy.strelchun at intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4937>
(cherry picked from commit 4f17e9eef6f9f8a2986264b3da5157542983a1da)

---

 .pick_status.json                      | 2 +-
 src/intel/vulkan/anv_extensions.py     | 2 +-
 src/intel/vulkan/anv_extensions_gen.py | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 445a5c85d61..3e91e9ff3fe 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -283,7 +283,7 @@
         "description": "anv: don't expose VK_INTEL_performance_query without kernel support",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "2b5f30b1d91b98ab27ba21439cd8a40a0d1ece36"
     },
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
index 0392b0d2474..de643ea1fec 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -171,7 +171,7 @@ EXTENSIONS = [
     Extension('VK_ANDROID_native_buffer',                 7, 'ANDROID'),
     Extension('VK_GOOGLE_decorate_string',                1, True),
     Extension('VK_GOOGLE_hlsl_functionality1',            1, True),
-    Extension('VK_INTEL_performance_query',               1, 'device->perf'),
+    Extension('VK_INTEL_performance_query',               1, 'device->perf && device->perf->i915_perf_version >= 3'),
     Extension('VK_INTEL_shader_integer_functions2',       1, 'device->info.gen >= 8'),
     Extension('VK_NV_compute_shader_derivatives',         1, True),
 ]
diff --git a/src/intel/vulkan/anv_extensions_gen.py b/src/intel/vulkan/anv_extensions_gen.py
index e83c0e16958..1218422284c 100644
--- a/src/intel/vulkan/anv_extensions_gen.py
+++ b/src/intel/vulkan/anv_extensions_gen.py
@@ -62,6 +62,8 @@ _TEMPLATE_H = Template(COPYRIGHT + """
 
 #include "stdbool.h"
 
+#include "perf/gen_perf.h"
+
 #define ANV_INSTANCE_EXTENSION_COUNT ${len(instance_extensions)}
 
 extern const VkExtensionProperties anv_instance_extensions[];



More information about the mesa-commit mailing list