23#define VK_CALL(GPU, X) GR_VK_CALL(GPU->vkInterface(), X)
25GrVkTextureRenderTarget::GrVkTextureRenderTarget(
GrVkGpu* gpu,
32 std::string_view label)
40 std::move(colorAttachment),
41 std::move(resolveAttachment),
42 CreateType::kFromTextureRT,
44 this->registerWithCache(budgeted);
47GrVkTextureRenderTarget::GrVkTextureRenderTarget(
55 std::string_view label)
62 std::move(resolveAttachment), CreateType::kFromTextureRT, label) {
63 this->registerWithCacheWrapped(cacheable);
76 if (!msaaAttachment) {
80 *resolveAttachment = std::move(
texture);
82 *colorAttachment = std::move(
texture);
96 std::string_view label) {
147 std::move(mutableState),
151 "VkImage_MakeWrappedTextureRenderTarget");
176 "Vk_MakeWrappedTextureRenderTarget"));
179size_t GrVkTextureRenderTarget::onGpuMemorySize()
const {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kBorrow_GrWrapOwnership
bool create_rt_attachments(GrVkGpu *gpu, SkISize dimensions, VkFormat format, int sampleCnt, GrProtected isProtected, sk_sp< GrVkImage > texture, sk_sp< GrVkImage > *colorAttachment, sk_sp< GrVkImage > *resolveAttachment)
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
GrResourceProvider * resourceProvider()
GrDirectContextPriv priv()
size_t gpuMemorySize() const
GrDirectContext * getContext()
SkISize dimensions() const
static size_t ComputeSize(const GrBackendFormat &, SkISize dimensions, int colorSamplesPerPixel, skgpu::Mipmapped, bool binSize=false)
skgpu::Mipmapped mipmapped() const
GrMipmapStatus mipmapStatus() const
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)
static sk_sp< GrVkImage > MakeTexture(GrVkGpu *gpu, SkISize dimensions, VkFormat format, uint32_t mipLevels, GrRenderable renderable, int numSamples, skgpu::Budgeted budgeted, GrProtected isProtected)
GrVkImage * nonMSAAAttachment() const
GrVkImage * colorAttachment() const
GrVkImage * resolveAttachment() const
GrBackendFormat backendFormat() const override
static sk_sp< GrVkTextureRenderTarget > MakeNewTextureRenderTarget(GrVkGpu *gpu, skgpu::Budgeted budgeted, SkISize dimensions, VkFormat format, uint32_t mipLevels, int sampleCnt, GrMipmapStatus mipmapStatus, GrProtected isProtected, std::string_view label)
static sk_sp< GrVkTextureRenderTarget > MakeWrappedTextureRenderTarget(GrVkGpu *, SkISize dimensions, int sampleCnt, GrWrapOwnership, GrWrapCacheable, const GrVkImageInfo &, sk_sp< skgpu::MutableTextureState >)
uint32_t uint32_t * format
@ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT