Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: src/gpu/vk/GrVkRenderTarget.cpp

Issue 2256843002: Don't add the resolve attachment to vulkan render passes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkRenderPass.cpp ('k') | src/gpu/vk/GrVkResourceProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkRenderTarget.cpp
diff --git a/src/gpu/vk/GrVkRenderTarget.cpp b/src/gpu/vk/GrVkRenderTarget.cpp
index dc966cab816413180ca10a3e381f014fc1b396c1..59fc0b980d353e40861fb3af6221213baf0fb8b8 100644
--- a/src/gpu/vk/GrVkRenderTarget.cpp
+++ b/src/gpu/vk/GrVkRenderTarget.cpp
@@ -239,7 +239,7 @@ void GrVkRenderTarget::createFramebuffer(GrVkGpu* gpu) {
const GrVkImageView* stencilView = this->stencilAttachmentView();
fFramebuffer = GrVkFramebuffer::Create(gpu, this->width(), this->height(),
fCachedSimpleRenderPass, fColorAttachmentView,
- fResolveAttachmentView, stencilView);
+ stencilView);
SkASSERT(fFramebuffer);
}
@@ -253,12 +253,6 @@ void GrVkRenderTarget::getAttachmentsDescriptor(
desc->fColor.fSamples = colorSamples ? colorSamples : 1;
*attachmentFlags = GrVkRenderPass::kColor_AttachmentFlag;
uint32_t attachmentCount = 1;
- if (colorSamples > 0) {
- desc->fResolve.fFormat = colorFormat;
- desc->fResolve.fSamples = 1;
- *attachmentFlags |= GrVkRenderPass::kResolve_AttachmentFlag;
- ++attachmentCount;
- }
const GrStencilAttachment* stencil = this->renderTargetPriv().getStencilAttachment();
if (stencil) {
@@ -284,12 +278,9 @@ GrVkRenderTarget::~GrVkRenderTarget() {
void GrVkRenderTarget::addResources(GrVkCommandBuffer& commandBuffer) const {
commandBuffer.addResource(this->framebuffer());
- commandBuffer.addResource(this->resource());
commandBuffer.addResource(this->colorAttachmentView());
- if (this->msaaImageResource()) {
- commandBuffer.addResource(this->msaaImageResource());
- commandBuffer.addResource(this->resolveAttachmentView());
- }
+ commandBuffer.addResource(this->msaaImageResource() ? this->msaaImageResource()
+ : this->resource());
if (this->stencilImageResource()) {
commandBuffer.addResource(this->stencilImageResource());
commandBuffer.addResource(this->stencilAttachmentView());
« no previous file with comments | « src/gpu/vk/GrVkRenderPass.cpp ('k') | src/gpu/vk/GrVkResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698