aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
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 /include/gpu
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 'include/gpu')
-rw-r--r--include/gpu/vk/GrVkTypes.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/gpu/vk/GrVkTypes.h b/include/gpu/vk/GrVkTypes.h
index 94b765f668..f457703115 100644
--- a/include/gpu/vk/GrVkTypes.h
+++ b/include/gpu/vk/GrVkTypes.h
@@ -9,6 +9,7 @@
#ifndef GrVkTypes_DEFINED
#define GrVkTypes_DEFINED
+#include "GrTypes.h"
#include "vk/GrVkDefines.h"
/**
@@ -29,13 +30,18 @@
* Types for interacting with Vulkan resources created externally to Skia. GrBackendObjects for
* Vulkan textures are really const GrVkImageInfo*
*/
+struct GrVkAlloc {
+ VkDeviceMemory fMemory; // can be VK_NULL_HANDLE iff Tex is an RT and uses borrow semantics
+ VkDeviceSize fOffset;
+};
+
struct GrVkImageInfo {
/**
* If the image's format is sRGB (GrVkFormatIsSRGB returns true), then the image must have
* been created with VkImageCreateFlags containing VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT.
*/
VkImage fImage;
- VkDeviceMemory fAlloc; // can be VK_NULL_HANDLE iff Tex is an RT and uses borrow semantics
+ GrVkAlloc fAlloc;
VkImageTiling fImageTiling;
VkImageLayout fImageLayout;
VkFormat fFormat;