aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2016-03-28 14:45:24 -0700
committerJordan Justen <[email protected]>2016-03-28 17:01:35 -0700
commit1a3adae84aa16247cba0e3619d54e6d8d543fcf1 (patch)
treea1bed20c88e2ead09a81f1304b6d3d43c8c61bb9
parentf60683b32a45081979df089894d36d05f2d0ec0c (diff)
anv/gen7: Save kernel command parser version
Signed-off-by: Jordan Justen <[email protected]>
-rw-r--r--src/intel/vulkan/anv_device.c11
-rw-r--r--src/intel/vulkan/anv_private.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 54a1f1274ab..01d3c996ad2 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -99,6 +99,17 @@ anv_physical_device_init(struct anv_physical_device *device,
goto fail;
}
+ device->cmd_parser_version = -1;
+ if (device->info->gen == 7) {
+ device->cmd_parser_version =
+ anv_gem_get_param(fd, I915_PARAM_CMD_PARSER_VERSION);
+ if (device->cmd_parser_version == -1) {
+ result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
+ "failed to get command parser version");
+ goto fail;
+ }
+ }
+
if (anv_gem_get_aperture(fd, &device->aperture_size) == -1) {
result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
"failed to get aperture size: %m");
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 77f453afb36..48ebff456e3 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -546,6 +546,7 @@ struct anv_physical_device {
uint64_t aperture_size;
struct brw_compiler * compiler;
struct isl_device isl_dev;
+ int cmd_parser_version;
};
struct anv_wsi_interaface;