summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-02 10:39:15 -0800
committerJason Ekstrand <[email protected]>2015-12-03 13:43:54 -0800
commite6ab06ae7f084ba0df4c4274e5de010a3a751cc2 (patch)
tree637e41e08bb8168880b6d2a772255e947e8b0e54
parent93071482f98a1e36507c282d093483c534736ee1 (diff)
vk/0.210.0: Rework memory property flags
-rw-r--r--include/vulkan/vulkan.h11
-rw-r--r--src/vulkan/anv_device.c7
2 files changed, 10 insertions, 8 deletions
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,
};
}