8#ifndef GrVkImage_DEFINED
9#define GrVkImage_DEFINED
65 std::string_view label,
66 bool forSecondaryCB =
false);
85 bool usesDRMModifier =
142 uint32_t newQueueFamilyIndex);
217#if defined(GR_TEST_UTILS)
218 void setCurrentQueueFamilyToGraphicsQueue(
GrVkGpu* gpu);
241 std::string_view label);
253 std::string_view label);
255 void init(
GrVkGpu*,
bool forSecondaryCB);
257 void onRelease()
override;
258 void onAbandon()
override;
261 bool hasResource()
const {
return fResource; }
266 uint32_t fInitialQueueFamily;
281 explicit Resource(
const GrVkGpu* gpu)
296 ~Resource()
override {}
298#ifdef SK_TRACE_MANAGED_RESOURCES
299 void dumpInfo()
const override {
300 SkDebugf(
"GrVkImage: %" PRIdPTR
" (%d refs)\n", (intptr_t)fImage, this->getRefCnt());
309 void freeGPUData()
const override;
319 class BorrowedResource :
public Resource {
326 void freeGPUData()
const override;
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
#define INHERITED(method,...)
static constexpr bool SkToBool(const T &x)
UsageFlags supportedUsages() const
SkISize dimensions() const
const GrVkImageView * framebufferView() const
void prepareForPresent(GrVkGpu *gpu)
static sk_sp< GrVkImage > MakeStencil(GrVkGpu *gpu, SkISize dimensions, int sampleCnt, VkFormat format)
const GrVkImageView * textureView() const
void setQueueFamilyIndex(uint32_t queueFamilyIndex)
void(* ReleaseProc)(ReleaseCtx)
static VkAccessFlags LayoutToSrcAccessMask(const VkImageLayout layout)
uint32_t mipLevels() const
bool isLinearTiled() const
void setImageLayout(const GrVkGpu *gpu, VkImageLayout newLayout, VkAccessFlags dstAccessMask, VkPipelineStageFlags dstStageMask, bool byRegion)
static void DestroyImageInfo(const GrVkGpu *gpu, GrVkImageInfo *)
GrBackendFormat backendFormat() const override
bool supportsInputAttachmentUsage() const
static sk_sp< GrVkImage > MakeMSAA(GrVkGpu *gpu, SkISize dimensions, int numSamples, VkFormat format, GrProtected isProtected, GrMemoryless memoryless)
VkImageLayout currentLayout() const
VkFormat imageFormat() const
sk_sp< skgpu::MutableTextureState > getMutableState() const
VkImageUsageFlags vkUsageFlags()
static sk_sp< GrVkImage > MakeWrapped(GrVkGpu *gpu, SkISize dimensions, const GrVkImageInfo &, sk_sp< skgpu::MutableTextureState >, UsageFlags attachmentUsages, GrWrapOwnership, GrWrapCacheable, std::string_view label, bool forSecondaryCB=false)
const skgpu::VulkanYcbcrConversionInfo & ycbcrConversionInfo() const
static VkPipelineStageFlags LayoutToPipelineSrcStageFlags(const VkImageLayout layout)
const Resource * resource() const
void prepareForExternal(GrVkGpu *gpu)
const skgpu::VulkanAlloc & alloc() const
void updateImageLayout(VkImageLayout newLayout)
static sk_sp< GrVkImage > MakeTexture(GrVkGpu *gpu, SkISize dimensions, VkFormat format, uint32_t mipLevels, GrRenderable renderable, int numSamples, skgpu::Budgeted budgeted, GrProtected isProtected)
gr_rp< const GrVkDescriptorSet > inputDescSetForMSAALoad(GrVkGpu *gpu)
uint32_t currentQueueFamilyIndex() const
gr_rp< const GrVkDescriptorSet > inputDescSetForBlending(GrVkGpu *gpu)
void setResourceRelease(sk_sp< RefCntedReleaseProc > releaseHelper)
const GrVkImageInfo & vkImageInfo() const
void setImageLayoutAndQueueIndex(const GrVkGpu *gpu, VkImageLayout newLayout, VkAccessFlags dstAccessMask, VkPipelineStageFlags dstStageMask, bool byRegion, uint32_t newQueueFamilyIndex)
static bool InitImageInfo(GrVkGpu *gpu, const ImageDesc &imageDesc, GrVkImageInfo *)
uint32_t uint32_t * format
void SetVkImageLayout(MutableTextureState *state, VkImageLayout layout)
SK_API uint32_t GetVkQueueFamilyIndex(const MutableTextureState &state)
void SetVkQueueFamilyIndex(MutableTextureState *state, uint32_t queueFamilyIndex)
SK_API VkImageLayout GetVkImageLayout(const MutableTextureState &state)
skgpu::VulkanAlloc fAlloc
skgpu::VulkanYcbcrConversionInfo fYcbcrConversionInfo
VkImageUsageFlags fImageUsageFlags
VkImageTiling fImageTiling
VkImageUsageFlags fUsageFlags
VkImageTiling fImageTiling
VkFlags VkPipelineStageFlags
@ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
VkFlags VkImageUsageFlags
@ VK_IMAGE_TILING_OPTIMAL
@ VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
@ VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
#define VK_QUEUE_FAMILY_IGNORED