diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-09 21:57:28 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-17 10:05:19 -0600 |
| commit | 9e016efe62abd37bb16febfde7f5bdc505a4a1e4 (patch) | |
| tree | 527e5fe50bee5ef2349a54cac007f2f235c36d05 /loader | |
| parent | 194bf287e512a5ec9b85f1a821f88589d1ba5f71 (diff) | |
| download | usermoji-9e016efe62abd37bb16febfde7f5bdc505a4a1e4.tar.xz | |
bug-14184: Transient memory allocations
Diffstat (limited to 'loader')
| -rw-r--r-- | loader/table_ops.h | 3 | ||||
| -rw-r--r-- | loader/trampoline.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/loader/table_ops.h b/loader/table_ops.h index 8e8ce9bf..601be425 100644 --- a/loader/table_ops.h +++ b/loader/table_ops.h @@ -49,6 +49,7 @@ static inline void loader_init_device_dispatch_table(VkLayerDispatchTable *table table->UnmapMemory = (PFN_vkUnmapMemory) gpa(dev, "vkUnmapMemory"); table->FlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) gpa(dev, "vkFlushMappedMemoryRanges"); table->InvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) gpa(dev, "vkInvalidateMappedMemoryRanges"); + table->GetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) gpa(dev, "vkGetDeviceMemoryCommitment"); table->GetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) gpa(dev, "vkGetBufferMemoryRequirements"); table->GetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) gpa(dev, "vkGetImageMemoryRequirements"); table->BindBufferMemory = (PFN_vkBindBufferMemory) gpa(dev, "vkBindBufferMemory"); @@ -208,6 +209,8 @@ static inline void *loader_lookup_device_dispatch_table( return (void *) table->FlushMappedMemoryRanges; if (!strcmp(name, "InvalidateMappedMemoryRanges")) return (void *) table->InvalidateMappedMemoryRanges; + if (!strcmp(name, "GetDeviceMemoryCommitment")) + return (void *) table->GetDeviceMemoryCommitment; if (!strcmp(name, "GetBufferMemoryRequirements")) return (void *) table->GetBufferMemoryRequirements; if (!strcmp(name, "GetImageMemoryRequirements")) diff --git a/loader/trampoline.c b/loader/trampoline.c index 13d4e680..0e102741 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -420,6 +420,15 @@ LOADER_EXPORT VkResult VKAPI vkInvalidateMappedMemoryRanges(VkDevice device, uin return disp->InvalidateMappedMemoryRanges(device, memRangeCount, pMemRanges); } +LOADER_EXPORT VkResult VKAPI vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) +{ + const VkLayerDispatchTable *disp; + + disp = loader_get_dispatch(device); + + return disp->GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); +} + LOADER_EXPORT VkResult VKAPI vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { const VkLayerDispatchTable *disp; |
