anv/gen7: Save kernel command parser version
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 28 Mar 2016 21:45:24 +0000 (14:45 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 29 Mar 2016 00:01:35 +0000 (17:01 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h

index 54a1f1274ab417ee7ad92a8bce85a0cc2bec9ff2..01d3c996ad2a7a57bcf59f3af01c15b170ff14e8 100644 (file)
@@ -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");
index 77f453afb36ac1b1077b6de5b59ae22a02ebe5e6..48ebff456e38e5d067ac0b01d56e876460135b50 100644 (file)
@@ -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;