Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrVkImage_DEFINED |
| 9 | #define GrVkImage_DEFINED |
| 10 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/core/SkTypes.h" |
| 12 | #include "include/gpu/GrBackendSurface.h" |
| 13 | #include "include/gpu/GrTexture.h" |
| 14 | #include "include/gpu/vk/GrVkTypes.h" |
| 15 | #include "include/private/GrTypesPriv.h" |
| 16 | #include "src/gpu/vk/GrVkImageLayout.h" |
| 17 | #include "src/gpu/vk/GrVkResource.h" |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 18 | |
| 19 | class GrVkGpu; |
Brian Salomon | 614c1a8 | 2018-12-19 15:42:06 -0500 | [diff] [blame] | 20 | class GrVkTexture; |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 21 | |
| 22 | class GrVkImage : SkNoncopyable { |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 23 | private: |
| 24 | class Resource; |
| 25 | |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 26 | public: |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 27 | GrVkImage(const GrVkImageInfo& info, sk_sp<GrVkImageLayout> layout, |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 28 | GrBackendObjectOwnership ownership, bool forSecondaryCB = false) |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 29 | : fInfo(info) |
Greg Daniel | ecddbc0 | 2018-08-30 16:39:34 -0400 | [diff] [blame] | 30 | , fInitialQueueFamily(info.fCurrentQueueFamily) |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 31 | , fLayout(std::move(layout)) |
| 32 | , fIsBorrowed(GrBackendObjectOwnership::kBorrowed == ownership) { |
| 33 | SkASSERT(fLayout->getImageLayout() == fInfo.fImageLayout); |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 34 | if (forSecondaryCB) { |
| 35 | fResource = nullptr; |
| 36 | } else if (fIsBorrowed) { |
jvanverth | 6b6ffc4 | 2016-06-13 14:28:07 -0700 | [diff] [blame] | 37 | fResource = new BorrowedResource(info.fImage, info.fAlloc, info.fImageTiling); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 38 | } else { |
Jim Van Verth | 658d499 | 2019-07-11 14:07:53 -0400 | [diff] [blame] | 39 | SkASSERT(VK_NULL_HANDLE != info.fAlloc.fMemory); |
jvanverth | 6b6ffc4 | 2016-06-13 14:28:07 -0700 | [diff] [blame] | 40 | fResource = new Resource(info.fImage, info.fAlloc, info.fImageTiling); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 41 | } |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 42 | } |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 43 | virtual ~GrVkImage(); |
| 44 | |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 45 | VkImage image() const { |
| 46 | // Should only be called when we have a real fResource object, i.e. never when being used as |
| 47 | // a RT in an external secondary command buffer. |
| 48 | SkASSERT(fResource); |
| 49 | return fInfo.fImage; |
| 50 | } |
| 51 | const GrVkAlloc& alloc() const { |
| 52 | // Should only be called when we have a real fResource object, i.e. never when being used as |
| 53 | // a RT in an external secondary command buffer. |
| 54 | SkASSERT(fResource); |
| 55 | return fInfo.fAlloc; |
| 56 | } |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 57 | VkFormat imageFormat() const { return fInfo.fFormat; } |
Greg Daniel | 4065d45 | 2018-11-16 15:43:41 -0500 | [diff] [blame] | 58 | GrBackendFormat getBackendFormat() const { |
Greg Daniel | 89df784 | 2019-02-21 12:40:21 -0500 | [diff] [blame] | 59 | if (fResource && this->ycbcrConversionInfo().isValid()) { |
Sergey Ulanov | 2739fd2 | 2019-08-11 22:46:33 -0700 | [diff] [blame] | 60 | SkASSERT(this->imageFormat() == this->ycbcrConversionInfo().fFormat); |
Greg Daniel | 89df784 | 2019-02-21 12:40:21 -0500 | [diff] [blame] | 61 | return GrBackendFormat::MakeVk(this->ycbcrConversionInfo()); |
| 62 | } |
| 63 | SkASSERT(this->imageFormat() != VK_FORMAT_UNDEFINED); |
Greg Daniel | 4065d45 | 2018-11-16 15:43:41 -0500 | [diff] [blame] | 64 | return GrBackendFormat::MakeVk(this->imageFormat()); |
| 65 | } |
egdaniel | 7ac5da8 | 2016-07-15 13:41:42 -0700 | [diff] [blame] | 66 | uint32_t mipLevels() const { return fInfo.fLevelCount; } |
Greg Daniel | 9a51a86 | 2018-11-30 10:18:14 -0500 | [diff] [blame] | 67 | const GrVkYcbcrConversionInfo& ycbcrConversionInfo() const { |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 68 | // Should only be called when we have a real fResource object, i.e. never when being used as |
| 69 | // a RT in an external secondary command buffer. |
| 70 | SkASSERT(fResource); |
Greg Daniel | 9a51a86 | 2018-11-30 10:18:14 -0500 | [diff] [blame] | 71 | return fInfo.fYcbcrConversionInfo; |
| 72 | } |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 73 | const Resource* resource() const { |
| 74 | SkASSERT(fResource); |
| 75 | return fResource; |
| 76 | } |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 77 | bool isLinearTiled() const { |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 78 | // Should only be called when we have a real fResource object, i.e. never when being used as |
| 79 | // a RT in an external secondary command buffer. |
| 80 | SkASSERT(fResource); |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 81 | return SkToBool(VK_IMAGE_TILING_LINEAR == fInfo.fImageTiling); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 82 | } |
Brian Osman | 13dddce | 2017-05-09 13:19:50 -0400 | [diff] [blame] | 83 | bool isBorrowed() const { return fIsBorrowed; } |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 84 | |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 85 | sk_sp<GrVkImageLayout> grVkImageLayout() const { return fLayout; } |
| 86 | |
| 87 | VkImageLayout currentLayout() const { |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 88 | return fLayout->getImageLayout(); |
| 89 | } |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 90 | |
egdaniel | 58a8d92 | 2016-04-21 08:03:10 -0700 | [diff] [blame] | 91 | void setImageLayout(const GrVkGpu* gpu, |
| 92 | VkImageLayout newLayout, |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 93 | VkAccessFlags dstAccessMask, |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 94 | VkPipelineStageFlags dstStageMask, |
Greg Daniel | ecddbc0 | 2018-08-30 16:39:34 -0400 | [diff] [blame] | 95 | bool byRegion, |
| 96 | bool releaseFamilyQueue = false); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 97 | |
Greg Daniel | bae7121 | 2019-03-01 15:24:35 -0500 | [diff] [blame] | 98 | // Returns the image to its original queue family and changes the layout to present if the queue |
| 99 | // family is not external or foreign. |
| 100 | void prepareForPresent(GrVkGpu* gpu); |
| 101 | |
Greg Daniel | 797efca | 2019-05-09 14:04:20 -0400 | [diff] [blame] | 102 | // Returns the image to its original queue family |
| 103 | void prepareForExternal(GrVkGpu* gpu); |
| 104 | |
Greg Daniel | 31cc731 | 2018-03-05 11:41:06 -0500 | [diff] [blame] | 105 | // This simply updates our tracking of the image layout and does not actually do any gpu work. |
| 106 | // This is only used for mip map generation where we are manually changing the layouts as we |
| 107 | // blit each layer, and then at the end need to update our tracking. |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 108 | void updateImageLayout(VkImageLayout newLayout) { |
Greg Daniel | b46add8 | 2019-01-02 14:51:29 -0500 | [diff] [blame] | 109 | // Should only be called when we have a real fResource object, i.e. never when being used as |
| 110 | // a RT in an external secondary command buffer. |
| 111 | SkASSERT(fResource); |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 112 | fLayout->setImageLayout(newLayout); |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 113 | } |
Greg Daniel | 31cc731 | 2018-03-05 11:41:06 -0500 | [diff] [blame] | 114 | |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 115 | struct ImageDesc { |
| 116 | VkImageType fImageType; |
| 117 | VkFormat fFormat; |
| 118 | uint32_t fWidth; |
| 119 | uint32_t fHeight; |
| 120 | uint32_t fLevels; |
| 121 | uint32_t fSamples; |
| 122 | VkImageTiling fImageTiling; |
| 123 | VkImageUsageFlags fUsageFlags; |
| 124 | VkFlags fMemProps; |
Emircan Uysaler | 23ca4e7 | 2019-06-24 10:53:09 -0400 | [diff] [blame] | 125 | GrProtected fIsProtected; |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 126 | |
| 127 | ImageDesc() |
Emircan Uysaler | 23ca4e7 | 2019-06-24 10:53:09 -0400 | [diff] [blame] | 128 | : fImageType(VK_IMAGE_TYPE_2D) |
| 129 | , fFormat(VK_FORMAT_UNDEFINED) |
| 130 | , fWidth(0) |
| 131 | , fHeight(0) |
| 132 | , fLevels(1) |
| 133 | , fSamples(1) |
| 134 | , fImageTiling(VK_IMAGE_TILING_OPTIMAL) |
| 135 | , fUsageFlags(0) |
| 136 | , fMemProps(VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) |
| 137 | , fIsProtected(GrProtected::kNo) {} |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 138 | }; |
| 139 | |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 140 | static bool InitImageInfo(const GrVkGpu* gpu, const ImageDesc& imageDesc, GrVkImageInfo*); |
| 141 | // Destroys the internal VkImage and VkDeviceMemory in the GrVkImageInfo |
| 142 | static void DestroyImageInfo(const GrVkGpu* gpu, GrVkImageInfo*); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 143 | |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 144 | // These match the definitions in SkImage, for whence they came |
| 145 | typedef void* ReleaseCtx; |
| 146 | typedef void (*ReleaseProc)(ReleaseCtx); |
| 147 | |
Brian Salomon | b2c5dae | 2019-03-04 10:25:17 -0500 | [diff] [blame] | 148 | void setResourceRelease(sk_sp<GrRefCntedCallback> releaseHelper); |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 149 | |
Greg Daniel | 6ddbafc | 2018-05-24 12:34:29 -0400 | [diff] [blame] | 150 | // Helpers to use for setting the layout of the VkImage |
Greg Daniel | f7828d0 | 2018-10-09 12:01:32 -0400 | [diff] [blame] | 151 | static VkPipelineStageFlags LayoutToPipelineSrcStageFlags(const VkImageLayout layout); |
Greg Daniel | 6ddbafc | 2018-05-24 12:34:29 -0400 | [diff] [blame] | 152 | static VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout); |
| 153 | |
Greg Daniel | 59dc148 | 2019-02-22 10:46:38 -0500 | [diff] [blame] | 154 | #if GR_TEST_UTILS |
| 155 | void setCurrentQueueFamilyToGraphicsQueue(GrVkGpu* gpu); |
| 156 | #endif |
| 157 | |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 158 | protected: |
Ethan Nicholas | 8e265a7 | 2018-12-12 16:22:40 -0500 | [diff] [blame] | 159 | void releaseImage(GrVkGpu* gpu); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 160 | void abandonImage(); |
Brian Salomon | 9bc76d9 | 2019-01-24 12:18:33 -0500 | [diff] [blame] | 161 | bool hasResource() const { return fResource; } |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 162 | |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 163 | GrVkImageInfo fInfo; |
Greg Daniel | ecddbc0 | 2018-08-30 16:39:34 -0400 | [diff] [blame] | 164 | uint32_t fInitialQueueFamily; |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 165 | sk_sp<GrVkImageLayout> fLayout; |
Greg Daniel | 52e16d9 | 2018-04-10 09:34:07 -0400 | [diff] [blame] | 166 | bool fIsBorrowed; |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 167 | |
| 168 | private: |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 169 | class Resource : public GrVkResource { |
| 170 | public: |
| 171 | Resource() |
Greg Daniel | 6a0176b | 2018-01-30 09:28:44 -0500 | [diff] [blame] | 172 | : fImage(VK_NULL_HANDLE) { |
jvanverth | 1e305ba | 2016-06-01 09:39:15 -0700 | [diff] [blame] | 173 | fAlloc.fMemory = VK_NULL_HANDLE; |
| 174 | fAlloc.fOffset = 0; |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 175 | } |
| 176 | |
jvanverth | 6b6ffc4 | 2016-06-13 14:28:07 -0700 | [diff] [blame] | 177 | Resource(VkImage image, const GrVkAlloc& alloc, VkImageTiling tiling) |
Greg Daniel | 6a0176b | 2018-01-30 09:28:44 -0500 | [diff] [blame] | 178 | : fImage(image) |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 179 | , fAlloc(alloc) |
| 180 | , fImageTiling(tiling) {} |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 181 | |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 182 | ~Resource() override { |
Greg Daniel | 6a0176b | 2018-01-30 09:28:44 -0500 | [diff] [blame] | 183 | SkASSERT(!fReleaseHelper); |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 184 | } |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 185 | |
jvanverth | 7ec9241 | 2016-07-06 09:24:57 -0700 | [diff] [blame] | 186 | #ifdef SK_TRACE_VK_RESOURCES |
| 187 | void dumpInfo() const override { |
egdaniel | a95220d | 2016-07-21 11:50:37 -0700 | [diff] [blame] | 188 | SkDebugf("GrVkImage: %d (%d refs)\n", fImage, this->getRefCnt()); |
jvanverth | 7ec9241 | 2016-07-06 09:24:57 -0700 | [diff] [blame] | 189 | } |
| 190 | #endif |
Brian Salomon | b2c5dae | 2019-03-04 10:25:17 -0500 | [diff] [blame] | 191 | void setRelease(sk_sp<GrRefCntedCallback> releaseHelper) { |
Greg Daniel | 6a0176b | 2018-01-30 09:28:44 -0500 | [diff] [blame] | 192 | fReleaseHelper = std::move(releaseHelper); |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 193 | } |
Brian Salomon | 614c1a8 | 2018-12-19 15:42:06 -0500 | [diff] [blame] | 194 | |
| 195 | /** |
Brian Salomon | e80b809 | 2019-03-08 13:25:19 -0500 | [diff] [blame] | 196 | * These are used to coordinate calling the "finished" idle procs between the GrVkTexture |
| 197 | * and the Resource. If the GrVkTexture becomes purgeable and if there are no command |
| 198 | * buffers referring to the Resource then it calls the procs. Otherwise, the Resource calls |
| 199 | * them when the last command buffer reference goes away and the GrVkTexture is purgeable. |
Brian Salomon | 614c1a8 | 2018-12-19 15:42:06 -0500 | [diff] [blame] | 200 | */ |
Brian Salomon | e80b809 | 2019-03-08 13:25:19 -0500 | [diff] [blame] | 201 | void addIdleProc(GrVkTexture*, sk_sp<GrRefCntedCallback>) const; |
| 202 | int idleProcCnt() const; |
| 203 | sk_sp<GrRefCntedCallback> idleProc(int) const; |
| 204 | void resetIdleProcs() const; |
Brian Salomon | 614c1a8 | 2018-12-19 15:42:06 -0500 | [diff] [blame] | 205 | void removeOwningTexture() const; |
| 206 | |
| 207 | /** |
| 208 | * We track how many outstanding references this Resource has in command buffers and |
| 209 | * when the count reaches zero we call the idle proc. |
| 210 | */ |
| 211 | void notifyAddedToCommandBuffer() const override; |
| 212 | void notifyRemovedFromCommandBuffer() const override; |
| 213 | bool isOwnedByCommandBuffer() const { return fNumCommandBufferOwners > 0; } |
| 214 | |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 215 | protected: |
Brian Salomon | b2c5dae | 2019-03-04 10:25:17 -0500 | [diff] [blame] | 216 | mutable sk_sp<GrRefCntedCallback> fReleaseHelper; |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 217 | |
Brian Salomon | 8cabb32 | 2019-02-22 10:44:19 -0500 | [diff] [blame] | 218 | void invokeReleaseProc() const { |
| 219 | if (fReleaseHelper) { |
| 220 | // Depending on the ref count of fReleaseHelper this may or may not actually trigger |
| 221 | // the ReleaseProc to be called. |
| 222 | fReleaseHelper.reset(); |
| 223 | } |
| 224 | } |
| 225 | |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 226 | private: |
Ethan Nicholas | 8e265a7 | 2018-12-12 16:22:40 -0500 | [diff] [blame] | 227 | void freeGPUData(GrVkGpu* gpu) const override; |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 228 | void abandonGPUData() const override { |
Brian Salomon | 8cabb32 | 2019-02-22 10:44:19 -0500 | [diff] [blame] | 229 | this->invokeReleaseProc(); |
Greg Daniel | 6a0176b | 2018-01-30 09:28:44 -0500 | [diff] [blame] | 230 | SkASSERT(!fReleaseHelper); |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 231 | } |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 232 | |
jvanverth | 1e305ba | 2016-06-01 09:39:15 -0700 | [diff] [blame] | 233 | VkImage fImage; |
| 234 | GrVkAlloc fAlloc; |
jvanverth | 6b6ffc4 | 2016-06-13 14:28:07 -0700 | [diff] [blame] | 235 | VkImageTiling fImageTiling; |
Brian Salomon | 614c1a8 | 2018-12-19 15:42:06 -0500 | [diff] [blame] | 236 | mutable int fNumCommandBufferOwners = 0; |
Brian Salomon | e80b809 | 2019-03-08 13:25:19 -0500 | [diff] [blame] | 237 | mutable SkTArray<sk_sp<GrRefCntedCallback>> fIdleProcs; |
Brian Salomon | 614c1a8 | 2018-12-19 15:42:06 -0500 | [diff] [blame] | 238 | mutable GrVkTexture* fOwningTexture = nullptr; |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 239 | |
| 240 | typedef GrVkResource INHERITED; |
| 241 | }; |
| 242 | |
| 243 | // for wrapped textures |
| 244 | class BorrowedResource : public Resource { |
| 245 | public: |
jvanverth | 6b6ffc4 | 2016-06-13 14:28:07 -0700 | [diff] [blame] | 246 | BorrowedResource(VkImage image, const GrVkAlloc& alloc, VkImageTiling tiling) |
| 247 | : Resource(image, alloc, tiling) { |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 248 | } |
| 249 | private: |
Ethan Nicholas | 8e265a7 | 2018-12-12 16:22:40 -0500 | [diff] [blame] | 250 | void freeGPUData(GrVkGpu* gpu) const override; |
Greg Daniel | cef213c | 2017-04-21 11:52:27 -0400 | [diff] [blame] | 251 | void abandonGPUData() const override; |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 252 | }; |
| 253 | |
Greg Daniel | 6a0176b | 2018-01-30 09:28:44 -0500 | [diff] [blame] | 254 | Resource* fResource; |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 255 | |
egdaniel | b2df0c2 | 2016-05-13 11:30:37 -0700 | [diff] [blame] | 256 | friend class GrVkRenderTarget; |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 257 | }; |
| 258 | |
| 259 | #endif |