summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-11-25 12:06:20 -0600
committerJason Ekstrand <[email protected]>2019-12-05 10:59:10 -0600
commitc142a40a92fc4a1ac4ac19141abd1d9d37ddd652 (patch)
tree4c58052a42082cd482066e9a1a1a91b6a24a46c3 /src/intel
parent0bba88081b416586d733878977da5950fa3e93d6 (diff)
anv: Add a has_softpin boolean
This separates "has" from "use" which will make the next commit a bit cleaner. Reviewed-by: Ivan Briano <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_device.c5
-rw-r--r--src/intel/vulkan/anv_private.h4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 87978b3d086..2c48003b276 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -475,6 +475,7 @@ anv_physical_device_init(struct anv_physical_device *device,
if (result != VK_SUCCESS)
goto fail;
+ device->has_softpin = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_SOFTPIN);
device->has_exec_async = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_ASYNC);
device->has_exec_capture = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_CAPTURE);
device->has_exec_fence = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_FENCE);
@@ -483,8 +484,8 @@ anv_physical_device_init(struct anv_physical_device *device,
anv_gem_supports_syncobj_wait(fd);
device->has_context_priority = anv_gem_has_context_priority(fd);
- device->use_softpin = anv_gem_get_param(fd, I915_PARAM_HAS_EXEC_SOFTPIN)
- && device->supports_48bit_addresses;
+ device->use_softpin = device->has_softpin &&
+ device->supports_48bit_addresses;
device->has_context_isolation =
anv_gem_get_param(fd, I915_PARAM_HAS_CONTEXT_ISOLATION);
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index d4d14245501..fd6f0fdb104 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -981,15 +981,17 @@ struct anv_physical_device {
struct isl_device isl_dev;
struct gen_perf_config * perf;
int cmd_parser_version;
+ bool has_softpin;
bool has_exec_async;
bool has_exec_capture;
bool has_exec_fence;
bool has_syncobj;
bool has_syncobj_wait;
bool has_context_priority;
- bool use_softpin;
bool has_context_isolation;
bool has_mem_available;
+
+ bool use_softpin;
bool always_use_bindless;
/** True if we can access buffers using A64 messages */