From: Jason Ekstrand Date: Wed, 2 Dec 2015 18:39:15 +0000 (-0800) Subject: vk/0.210.0: Rework memory property flags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6ab06ae7f084ba0df4c4274e5de010a3a751cc2;p=mesa.git vk/0.210.0: Rework memory property flags --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 22cdeab98a1..9b67a9952be 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -830,17 +830,16 @@ typedef enum VkQueueFlagBits { typedef VkFlags VkQueueFlags; typedef enum VkMemoryPropertyFlagBits { - VK_MEMORY_PROPERTY_DEVICE_ONLY = 0, - VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000001, - VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT = 0x00000002, - VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT = 0x00000004, - VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT = 0x00000008, + VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, + VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, } VkMemoryPropertyFlagBits; typedef VkFlags VkMemoryPropertyFlags; typedef enum VkMemoryHeapFlagBits { - VK_MEMORY_HEAP_HOST_LOCAL_BIT = 0x00000001, + VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, } VkMemoryHeapFlagBits; typedef VkFlags VkMemoryHeapFlags; typedef VkFlags VkDeviceCreateFlags; diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 6fa7c9952e0..9cf40e6d858 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -530,14 +530,17 @@ void anv_GetPhysicalDeviceMemoryProperties( /* The property flags below are valid only for llc platforms. */ pMemoryProperties->memoryTypeCount = 1; pMemoryProperties->memoryTypes[0] = (VkMemoryType) { - .propertyFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, + .propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + VK_MEMORY_PROPERTY_HOST_CACHED_BIT, .heapIndex = 1, }; pMemoryProperties->memoryHeapCount = 1; pMemoryProperties->memoryHeaps[0] = (VkMemoryHeap) { .size = heap_size, - .flags = VK_MEMORY_HEAP_HOST_LOCAL_BIT, + .flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT, }; }