From c142a40a92fc4a1ac4ac19141abd1d9d37ddd652 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 25 Nov 2019 12:06:20 -0600 Subject: [PATCH] anv: Add a has_softpin boolean This separates "has" from "use" which will make the next commit a bit cleaner. Reviewed-by: Ivan Briano Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/anv_device.c | 5 +++-- src/intel/vulkan/anv_private.h | 4 +++- 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 */ -- 2.30.2