aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2015-07-09 21:57:28 -0600
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-07-17 10:05:19 -0600
commit9e016efe62abd37bb16febfde7f5bdc505a4a1e4 (patch)
tree527e5fe50bee5ef2349a54cac007f2f235c36d05 /include
parent194bf287e512a5ec9b85f1a821f88589d1ba5f71 (diff)
downloadusermoji-9e016efe62abd37bb16febfde7f5bdc505a4a1e4.tar.xz
bug-14184: Transient memory allocations
Diffstat (limited to 'include')
-rw-r--r--include/vk_layer.h1
-rw-r--r--include/vulkan.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/vk_layer.h b/include/vk_layer.h
index 0881d24f..6d1945bf 100644
--- a/include/vk_layer.h
+++ b/include/vk_layer.h
@@ -41,6 +41,7 @@ typedef struct VkLayerDispatchTable_
PFN_vkUnmapMemory UnmapMemory;
PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges;
PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges;
+ PFN_vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment;
PFN_vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements;
PFN_vkGetImageMemoryRequirements GetImageMemoryRequirements;
PFN_vkGetBufferMemoryRequirements GetBufferMemoryRequirements;
diff --git a/include/vulkan.h b/include/vulkan.h
index 78b0152c..62049412 100644
--- a/include/vulkan.h
+++ b/include/vulkan.h
@@ -876,6 +876,7 @@ 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_LAZILY_ALLOCATED_BIT = 0x00000010, // Memory may be allocated by the driver when it is required
} VkMemoryPropertyFlagBits;
// Memory output flags passed to resource transition commands
@@ -2286,6 +2287,7 @@ typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, V
typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem);
typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges);
+typedef VkResult (VKAPI *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes);
typedef VkResult (VKAPI *PFN_vkBindBufferMemory)(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memOffset);
typedef VkResult (VKAPI *PFN_vkBindImageMemory)(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize memOffset);
typedef VkResult (VKAPI *PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements);
@@ -2546,6 +2548,12 @@ VkResult VKAPI vkInvalidateMappedMemoryRanges(
uint32_t memRangeCount,
const VkMappedMemoryRange* pMemRanges);
+VkResult VKAPI vkGetDeviceMemoryCommitment(
+ VkDevice device,
+ VkDeviceMemory memory,
+ VkDeviceSize* pCommittedMemoryInBytes);
+
+
// Memory management API functions
VkResult VKAPI vkBindBufferMemory(