aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/vk/GrVkTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/vk/GrVkTypes.h')
-rw-r--r--include/gpu/vk/GrVkTypes.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/gpu/vk/GrVkTypes.h b/include/gpu/vk/GrVkTypes.h
index bfc3d5ac3e..e57845ec5d 100644
--- a/include/gpu/vk/GrVkTypes.h
+++ b/include/gpu/vk/GrVkTypes.h
@@ -75,6 +75,22 @@ struct GrVkImageInfo {
VkFormat fFormat;
uint32_t fLevelCount;
+ GrVkImageInfo()
+ : fImage(VK_NULL_HANDLE)
+ , fAlloc()
+ , fImageTiling(VK_IMAGE_TILING_OPTIMAL)
+ , fImageLayout(VK_IMAGE_LAYOUT_UNDEFINED)
+ , fFormat(VK_FORMAT_UNDEFINED)
+ , fLevelCount(0) {}
+
+ GrVkImageInfo(const GrVkImageInfo& info, VkImageLayout layout)
+ : fImage(info.fImage)
+ , fAlloc(info.fAlloc)
+ , fImageTiling(info.fImageTiling)
+ , fImageLayout(layout)
+ , fFormat(info.fFormat)
+ , fLevelCount(info.fLevelCount) {}
+
// This gives a way for a client to update the layout of the Image if they change the layout
// while we're still holding onto the wrapped texture. They will first need to get a handle
// to our internal GrVkImageInfo by calling getTextureHandle on a GrVkTexture.