aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2015-07-02 17:09:57 -0600
committerMark Lobodzinski <mark@lunarg.com>2015-07-02 17:09:57 -0600
commit0f65d6fdecdd20a2164ff7bec80a8f53b1ff234a (patch)
treeadd654a5d6241b313c409d1fd1d86c419b86e926
parenta1e8fd0a503731aec138e2bc2a1171d3d10418e7 (diff)
downloadusermoji-0f65d6fdecdd20a2164ff7bec80a8f53b1ff234a.tar.xz
vulkan.h: V120 -- Tighten spec around VkMemoryRequirements
Moved the HOST_LOCAL memory property.
-rw-r--r--include/vulkan.h11
-rw-r--r--layers/param_checker.cpp6
-rw-r--r--layers/screenshot.cpp3
3 files changed, 11 insertions, 9 deletions
diff --git a/include/vulkan.h b/include/vulkan.h
index 68d0f718..6d79fcc5 100644
--- a/include/vulkan.h
+++ b/include/vulkan.h
@@ -33,7 +33,7 @@
#include "vk_platform.h"
// Vulkan API version supported by this file
-#define VK_API_VERSION VK_MAKE_VERSION(0, 119, 0)
+#define VK_API_VERSION VK_MAKE_VERSION(0, 120, 0)
#ifdef __cplusplus
extern "C"
@@ -892,7 +892,6 @@ typedef enum VkMemoryPropertyFlagBits_
// vkInvalidateMappedMemoryRanges must be used flush/invalidate host cache
VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT = VK_BIT(2), // Memory should not be cached by the host
VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT = VK_BIT(3), // Memory should support host write combining
- VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL = VK_BIT(4), // If set, prefer host access
} VkMemoryPropertyFlagBits;
// Memory output flags passed to resource transition commands
@@ -1116,6 +1115,13 @@ typedef enum VkQueryPipelineStatisticFlagBits_ {
// Memory mapping flags
typedef VkFlags VkMemoryMapFlags;
+// Memory heap flags
+typedef VkFlags VkMemoryHeapFlags;
+typedef enum VkMemoryHeapFlagBits_ {
+ VK_MEMORY_HEAP_HOST_LOCAL = VK_BIT(0), // If set, heap represents host memory
+} VkMemoryHeapFlagBits;
+
+
// ------------------------------------------------------------------------------------------------
// Vulkan structures
@@ -1318,6 +1324,7 @@ typedef struct VkMemoryType_
typedef struct VkMemoryHeap_
{
VkDeviceSize size; // Available memory in the heap
+ VkMemoryHeapFlags flags; // Flags for the heap
} VkMemoryHeap;
typedef struct VkPhysicalDeviceMemoryProperties_
diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp
index 2e0a755a..95710f6a 100644
--- a/layers/param_checker.cpp
+++ b/layers/param_checker.cpp
@@ -456,7 +456,7 @@ std::string EnumeratorString(VkQueueFlagBits const& enumerator)
static
bool ValidateEnumerator(VkMemoryPropertyFlagBits const& enumerator)
{
- VkMemoryPropertyFlagBits allFlags = (VkMemoryPropertyFlagBits)(VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL |
+ VkMemoryPropertyFlagBits allFlags = (VkMemoryPropertyFlagBits)(
VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT |
VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT |
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
@@ -479,10 +479,6 @@ std::string EnumeratorString(VkMemoryPropertyFlagBits const& enumerator)
}
std::vector<std::string> strings;
- if(enumerator & VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL)
- {
- strings.push_back("VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL");
- }
if(enumerator & VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT)
{
strings.push_back("VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT");
diff --git a/layers/screenshot.cpp b/layers/screenshot.cpp
index 19e8ed3d..313bb729 100644
--- a/layers/screenshot.cpp
+++ b/layers/screenshot.cpp
@@ -138,8 +138,7 @@ static void writePPM( const char *filename, VkImage image1)
0, // allocationSize, queried later
(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT |
- VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT |
- VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL)
+ VK_MEMORY_PROPERTY_HOST_WRITE_COMBINED_BIT)
};
const VkCmdBufferCreateInfo createCommandBufferInfo = {
VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO,