aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJon Ashburn <jon@lunarg.com>2015-01-20 13:55:32 -0700
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-02-04 17:58:09 -0700
commitc483a8c437fa02f5264463bbb6c3fa827398d7b5 (patch)
treebb0a6e29cb39d6287c421980926a61c1fa3d7b96 /include
parentae7c21c324727798ff100b17f3ac6a6bee20a506 (diff)
downloadusermoji-c483a8c437fa02f5264463bbb6c3fa827398d7b5.tar.xz
memory alloc: Remove memory_heap flags replace with memory_property flags
Conflicts: include/xgl.h tests/image_tests.cpp tests/init.cpp tests/xgltestbinding.h
Diffstat (limited to 'include')
-rw-r--r--include/xgl.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/include/xgl.h b/include/xgl.h
index 45c69d4a..fc1b38fb 100644
--- a/include/xgl.h
+++ b/include/xgl.h
@@ -976,16 +976,18 @@ typedef enum _XGL_QUEUE_FLAGS
XGL_QUEUE_EXTENDED_BIT = 0x80000000 // Extended queue
} XGL_QUEUE_FLAGS;
-// Memory heap properties
-typedef enum _XGL_MEMORY_HEAP_FLAGS
-{
- XGL_MEMORY_HEAP_CPU_VISIBLE_BIT = 0x00000001,
- XGL_MEMORY_HEAP_CPU_GPU_COHERENT_BIT = 0x00000002,
- XGL_MEMORY_HEAP_CPU_UNCACHED_BIT = 0x00000004,
- XGL_MEMORY_HEAP_CPU_WRITE_COMBINED_BIT = 0x00000008,
- XGL_MEMORY_HEAP_HOLDS_PINNED_BIT = 0x00000010,
- XGL_MEMORY_HEAP_SHAREABLE_BIT = 0x00000020,
-} XGL_MEMORY_HEAP_FLAGS;
+// memory properties passed into xglAllocMemory().
+typedef enum _XGL_MEMORY_PROPERTY_FLAGS
+{
+ XGL_MEMORY_PROPERTY_GPU_ONLY = 0x00000000, // If not set, then allocate memory on device (GPU)
+ XGL_MEMORY_PROPERTY_CPU_VISIBLE_BIT = 0x00000001,
+ XGL_MEMORY_PROPERTY_CPU_GPU_COHERENT_BIT = 0x00000002,
+ XGL_MEMORY_PROPERTY_CPU_UNCACHED_BIT = 0x00000004,
+ XGL_MEMORY_PROPERTY_CPU_WRITE_COMBINED_BIT = 0x00000008,
+ XGL_MEMORY_PROPERTY_PREFER_CPU_LOCAL = 0x00000010, // all else being equal, prefer CPU access
+ XGL_MEMORY_PROPERTY_SHAREABLE_BIT = 0x00000020,
+ XGL_MAX_ENUM(_XGL_MEMORY_PROPERTY_FLAGS)
+} XGL_MEMORY_PROPERTY_FLAGS;
// Memory allocation flags
typedef enum _XGL_MEMORY_ALLOC_FLAGS
@@ -1317,6 +1319,7 @@ typedef struct _XGL_MEMORY_ALLOC_INFO
XGL_UINT heapCount;
const XGL_UINT* pHeaps;
XGL_MEMORY_PRIORITY memPriority;
+ XGL_FLAGS memProps; // XGL_MEMORY_PROPERTY_FLAGS
} XGL_MEMORY_ALLOC_INFO;
// This structure is included in the XGL_MEMORY_ALLOC_INFO chain
@@ -1360,6 +1363,7 @@ typedef struct _XGL_MEMORY_REQUIREMENTS
XGL_GPU_SIZE granularity; // Granularity on which xglBindObjectMemoryRange can bind sub-ranges of memory specified in bytes (usually the page size)
XGL_UINT heapCount;
XGL_UINT* pHeaps;
+ XGL_FLAGS memProps; // XGL_MEMORY_PROPERTY_FLAGS
} XGL_MEMORY_REQUIREMENTS;
typedef struct _XGL_BUFFER_MEMORY_REQUIREMENTS