aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk/GrVkMemory.h
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2016-06-01 09:39:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-01 09:39:15 -0700
commit1e305ba0d6a4237020d36234e9e286d3b0489401 (patch)
tree703124336683add4f026ae699db8e079b357696c /src/gpu/vk/GrVkMemory.h
parent4a603fc591dcd36b3cb47344c244ecbbbaf179f4 (diff)
Add offset to memory allocations
This is setting up for suballocations within one large allocation BUG=skia:5031 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018933004 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2018933004
Diffstat (limited to 'src/gpu/vk/GrVkMemory.h')
-rw-r--r--src/gpu/vk/GrVkMemory.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/vk/GrVkMemory.h b/src/gpu/vk/GrVkMemory.h
index 2e61451514..279dd58dd5 100644
--- a/src/gpu/vk/GrVkMemory.h
+++ b/src/gpu/vk/GrVkMemory.h
@@ -9,6 +9,7 @@
#define GrVkMemory_DEFINED
#include "vk/GrVkDefines.h"
+#include "vk/GrVkTypes.h"
class GrVkGpu;
@@ -20,12 +21,14 @@ namespace GrVkMemory {
bool AllocAndBindBufferMemory(const GrVkGpu* gpu,
VkBuffer buffer,
const VkMemoryPropertyFlags flags,
- VkDeviceMemory* memory);
+ GrVkAlloc* alloc);
+ void FreeBufferMemory(const GrVkGpu* gpu, const GrVkAlloc& alloc);
bool AllocAndBindImageMemory(const GrVkGpu* gpu,
VkImage image,
const VkMemoryPropertyFlags flags,
- VkDeviceMemory* memory);
+ GrVkAlloc* alloc);
+ void FreeImageMemory(const GrVkGpu* gpu, const GrVkAlloc& alloc);
VkPipelineStageFlags LayoutToPipelineStageFlags(const VkImageLayout layout);