From 834a93da196bd710efa2d3f481cded30ae22ddd5 Mon Sep 17 00:00:00 2001 From: Tony Barbour Date: Thu, 16 Apr 2015 19:23:13 -0600 Subject: [PATCH] Bug 13632 Header 84 Add VkFlushMappedMemory --- include/vkLayer.h | 1 + include/vulkan.h | 5 +++++ layers/param_checker.cpp | 7 +++++++ vulkan.py | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/include/vkLayer.h b/include/vkLayer.h index 793ace9..39602e2 100644 --- a/include/vkLayer.h +++ b/include/vkLayer.h @@ -48,6 +48,7 @@ typedef struct VkLayerDispatchTable_ PFN_vkSetMemoryPriority SetMemoryPriority; PFN_vkMapMemory MapMemory; PFN_vkUnmapMemory UnmapMemory; + PFN_vkFlushMappedMemory FlushMappedMemory; PFN_vkPinSystemMemory PinSystemMemory; PFN_vkGetMultiDeviceCompatibility GetMultiDeviceCompatibility; PFN_vkOpenSharedMemory OpenSharedMemory; diff --git a/include/vulkan.h b/include/vulkan.h index ab347c4..f900825 100644 --- a/include/vulkan.h +++ b/include/vulkan.h @@ -2295,6 +2295,11 @@ VkResult VKAPI vkMapMemory( VkResult VKAPI vkUnmapMemory( VkDeviceMemory mem); +VkResult VKAPI vkFlushMappedMemory( + VkDeviceMemory mem, + VkDeviceSize offset, + VkDeviceSize size); + VkResult VKAPI vkPinSystemMemory( VkDevice device, const void* pSysMem, diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp index cfa0f30..03533ea 100644 --- a/layers/param_checker.cpp +++ b/layers/param_checker.cpp @@ -404,6 +404,13 @@ VK_LAYER_EXPORT VkResult VKAPI vkUnmapMemory(VkDeviceMemory mem) return result; } +VK_LAYER_EXPORT VkResult VKAPI vkFlushMappedMemory(VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size) +{ + + VkResult result = nextTable.FlushMappedMemory(mem, offset, size); + return result; +} + VK_LAYER_EXPORT VkResult VKAPI vkPinSystemMemory(VkDevice device, const void* pSysMem, size_t memSize, VkDeviceMemory* pMem) { diff --git a/vulkan.py b/vulkan.py index 5112e36..9301b51 100755 --- a/vulkan.py +++ b/vulkan.py @@ -319,6 +319,11 @@ core = Extension( Proto("VkResult", "UnmapMemory", [Param("VkDeviceMemory", "mem")]), + Proto("VkResult", "FlushMappedMemory", + [Param("VkDeviceMemory", "mem"), + Param("VkDeviceSize", "offset"), + Param("VkDeviceSize", "size")]), + Proto("VkResult", "PinSystemMemory", [Param("VkDevice", "device"), Param("const void*", "pSysMem"), -- 2.7.4