vk/0.210.0: Rework memory property flags
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 2 Dec 2015 18:39:15 +0000 (10:39 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 3 Dec 2015 21:43:54 +0000 (13:43 -0800)
include/vulkan/vulkan.h
src/vulkan/anv_device.c

index 22cdeab..9b67a99 100644 (file)
@@ -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;
index 6fa7c99..9cf40e6 100644 (file)
@@ -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,
    };
 }