aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/vk')
-rw-r--r--src/gpu/vk/GrVkRenderTarget.h4
-rw-r--r--src/gpu/vk/GrVkTextureRenderTarget.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/vk/GrVkRenderTarget.h b/src/gpu/vk/GrVkRenderTarget.h
index cf425fb0a2..272998e317 100644
--- a/src/gpu/vk/GrVkRenderTarget.h
+++ b/src/gpu/vk/GrVkRenderTarget.h
@@ -100,7 +100,9 @@ protected:
size_t onGpuMemorySize() const override {
// The plus 1 is to account for the resolve texture.
// TODO: is this still correct?
- return GrSurface::ComputeSize(fDesc, fDesc.fSampleCnt+1, false);
+ int numColorSamples = this->numColorSamples() + 1;
+ return GrSurface::ComputeSize(this->config(), this->width(), this->height(),
+ numColorSamples, false);
}
void createFramebuffer(GrVkGpu* gpu);
diff --git a/src/gpu/vk/GrVkTextureRenderTarget.h b/src/gpu/vk/GrVkTextureRenderTarget.h
index 2877a36265..03f9fdbbb1 100644
--- a/src/gpu/vk/GrVkTextureRenderTarget.h
+++ b/src/gpu/vk/GrVkTextureRenderTarget.h
@@ -115,7 +115,9 @@ private:
// GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuffer's memory.
size_t onGpuMemorySize() const override {
// The plus 1 is to account for the resolve texture.
- return GrSurface::ComputeSize(fDesc, fDesc.fSampleCnt+1, // TODO: this still correct?
+ int numColorSamples = this->numColorSamples() + 1;
+ return GrSurface::ComputeSize(this->config(), this->width(), this->height(),
+ numColorSamples, // TODO: this still correct?
this->texturePriv().hasMipMaps());
}
};