summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-05-17 11:38:16 -0700
committerJason Ekstrand <[email protected]>2017-05-23 16:46:40 -0700
commitb83b1af6f6936f36db42a8f8b8e0854d0f9491fd (patch)
tree23d6199241167f85e703d372b36239afce2346fa /src/intel/vulkan/anv_device.c
parent00df1cd9d6234cdfc9fb2bf3615196ff83a3c956 (diff)
anv: Make supports_48bit_addresses a heap property
Reviewed-by: Nanley Chery <[email protected]> Cc: "17.1" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 9444ff8b6d2..bb02378ab5f 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -149,9 +149,10 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
}
device->memory.heap_count = 1;
- device->memory.heaps[0] = (VkMemoryHeap) {
+ device->memory.heaps[0] = (struct anv_memory_heap) {
.size = heap_size,
.flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT,
+ .supports_48bit_addresses = device->supports_48bit_addresses,
};
return VK_SUCCESS;
@@ -1530,7 +1531,8 @@ VkResult anv_AllocateMemory(
goto fail;
}
- if (pdevice->supports_48bit_addresses)
+ assert(mem->type->heapIndex < pdevice->memory.heap_count);
+ if (pdevice->memory.heaps[mem->type->heapIndex].supports_48bit_addresses)
mem->bo->flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
if (pdevice->has_exec_async)