aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/vk')
-rw-r--r--src/gpu/vk/GrVkTexture.cpp6
-rw-r--r--src/gpu/vk/GrVkTextureRenderTarget.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/vk/GrVkTexture.cpp b/src/gpu/vk/GrVkTexture.cpp
index 4857db6f13..826f091ebe 100644
--- a/src/gpu/vk/GrVkTexture.cpp
+++ b/src/gpu/vk/GrVkTexture.cpp
@@ -186,7 +186,7 @@ bool GrVkTexture::reallocForMipmap(GrVkGpu* gpu, uint32_t mipLevels) {
return false;
}
- bool renderTarget = SkToBool(fDesc.fFlags & kRenderTarget_GrSurfaceFlag);
+ bool renderTarget = SkToBool(this->asRenderTarget());
VkImageUsageFlags usageFlags = VK_IMAGE_USAGE_SAMPLED_BIT;
if (renderTarget) {
@@ -197,8 +197,8 @@ bool GrVkTexture::reallocForMipmap(GrVkGpu* gpu, uint32_t mipLevels) {
GrVkImage::ImageDesc imageDesc;
imageDesc.fImageType = VK_IMAGE_TYPE_2D;
imageDesc.fFormat = fInfo.fFormat;
- imageDesc.fWidth = fDesc.fWidth;
- imageDesc.fHeight = fDesc.fHeight;
+ imageDesc.fWidth = this->width();
+ imageDesc.fHeight = this->height();
imageDesc.fLevels = mipLevels;
imageDesc.fSamples = 1;
imageDesc.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
diff --git a/src/gpu/vk/GrVkTextureRenderTarget.cpp b/src/gpu/vk/GrVkTextureRenderTarget.cpp
index cfa63be8af..2a6810d209 100644
--- a/src/gpu/vk/GrVkTextureRenderTarget.cpp
+++ b/src/gpu/vk/GrVkTextureRenderTarget.cpp
@@ -152,8 +152,8 @@ GrVkTextureRenderTarget::MakeWrappedTextureRenderTarget(GrVkGpu* gpu,
bool GrVkTextureRenderTarget::updateForMipmap(GrVkGpu* gpu, const GrVkImageInfo& newInfo) {
VkFormat pixelFormat;
- GrPixelConfigToVkFormat(fDesc.fConfig, &pixelFormat);
- if (fDesc.fSampleCnt) {
+ GrPixelConfigToVkFormat(this->config(), &pixelFormat);
+ if (this->numStencilSamples()) {
const GrVkImageView* resolveAttachmentView =
GrVkImageView::Create(gpu,
newInfo.fImage,