summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_intel.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-07-09 14:21:33 -0700
committerJason Ekstrand <[email protected]>2018-10-03 09:03:03 -0500
commit7a89a0d9edae638e68e4b4ee8e0cbb34baa9c080 (patch)
tree2772d7f0a493ea3b543dddfa642a4b4dece2d8cb /src/intel/vulkan/anv_intel.c
parent08bff097e136042aa5e5a0c99b1b67871525e5fe (diff)
anv: Use separate MOCS settings for external BOs
On Broadwell and above, we have to use different MOCS settings to allow the kernel to take over and disable caching when needed for external buffers. On Broadwell, this is especially important because the kernel can't disable eLLC so we have to do it in userspace. We very badly don't want to do that on everything so we need separate MOCS for external and internal BOs. In order to do this, we add an anv-specific BO flag for "external" and use that to distinguish between buffers which may be shared with other processes and/or display and those which are entirely internal. That, together with an anv_mocs_for_bo helper lets us choose the right MOCS settings for each BO use. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99507 Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_intel.c')
-rw-r--r--src/intel/vulkan/anv_intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_intel.c b/src/intel/vulkan/anv_intel.c
index 06db5787a9c..ed1bc096c66 100644
--- a/src/intel/vulkan/anv_intel.c
+++ b/src/intel/vulkan/anv_intel.c
@@ -73,7 +73,7 @@ VkResult anv_CreateDmaBufImageINTEL(
image = anv_image_from_handle(image_h);
- uint64_t bo_flags = 0;
+ uint64_t bo_flags = ANV_BO_EXTERNAL;
if (device->instance->physicalDevice.supports_48bit_addresses)
bo_flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
if (device->instance->physicalDevice.use_softpin)