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

Side by Side Diff: src/gpu/vk/GrVkTextureRenderTarget.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, 3 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 unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkResourceProvider.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrVkTextureRenderTarget.h" 8 #include "GrVkTextureRenderTarget.h"
9 9
10 #include "GrRenderTargetPriv.h" 10 #include "GrRenderTargetPriv.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 msImageDesc.fFormat = pixelFormat; 46 msImageDesc.fFormat = pixelFormat;
47 msImageDesc.fWidth = desc.fWidth; 47 msImageDesc.fWidth = desc.fWidth;
48 msImageDesc.fHeight = desc.fHeight; 48 msImageDesc.fHeight = desc.fHeight;
49 msImageDesc.fLevels = 1; 49 msImageDesc.fLevels = 1;
50 msImageDesc.fSamples = desc.fSampleCnt; 50 msImageDesc.fSamples = desc.fSampleCnt;
51 msImageDesc.fImageTiling = VK_IMAGE_TILING_OPTIMAL; 51 msImageDesc.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
52 msImageDesc.fUsageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; 52 msImageDesc.fUsageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
53 msImageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; 53 msImageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
54 54
55 if (!GrVkImage::InitImageInfo(gpu, msImageDesc, &msInfo)) { 55 if (!GrVkImage::InitImageInfo(gpu, msImageDesc, &msInfo)) {
56 imageView->unref(gpu);
56 return nullptr; 57 return nullptr;
57 } 58 }
58 59
59 // Set color attachment image 60 // Set color attachment image
60 colorImage = msInfo.fImage; 61 colorImage = msInfo.fImage;
61 62
62 // Create resolve attachment view. 63 // Create resolve attachment view.
63 resolveAttachmentView = GrVkImageView::Create(gpu, image, pixelFormat, 64 resolveAttachmentView = GrVkImageView::Create(gpu, image, pixelFormat,
64 GrVkImageView::kColor_Type , 65 GrVkImageView::kColor_Type ,
65 info.fLevelCount); 66 info.fLevelCount);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return false; 175 return false;
175 } 176 }
176 fColorAttachmentView->unref(gpu); 177 fColorAttachmentView->unref(gpu);
177 fColorAttachmentView = colorAttachmentView; 178 fColorAttachmentView = colorAttachmentView;
178 } 179 }
179 180
180 this->createFramebuffer(gpu); 181 this->createFramebuffer(gpu);
181 return true; 182 return true;
182 } 183 }
183 184
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkResourceProvider.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698