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

Side by Side Diff: src/gpu/vk/GrVkRenderTarget.cpp

Issue 1916563002: Add automatic generation of mipmaps to Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 8 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/GrVkPipelineState.cpp ('k') | src/gpu/vk/GrVkResourceProvider.h » ('j') | 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 "GrVkRenderTarget.h" 8 #include "GrVkRenderTarget.h"
9 9
10 #include "GrRenderTargetPriv.h" 10 #include "GrRenderTargetPriv.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 if (!msaaResource) { 139 if (!msaaResource) {
140 return nullptr; 140 return nullptr;
141 } 141 }
142 142
143 // Set color attachment image 143 // Set color attachment image
144 colorImage = msaaResource->fImage; 144 colorImage = msaaResource->fImage;
145 145
146 // Create Resolve attachment view 146 // Create Resolve attachment view
147 resolveAttachmentView = GrVkImageView::Create(gpu, imageResource->fImage , pixelFormat, 147 resolveAttachmentView = GrVkImageView::Create(gpu, imageResource->fImage , pixelFormat,
148 GrVkImageView::kColor_Type ); 148 GrVkImageView::kColor_Type , 1);
149 if (!resolveAttachmentView) { 149 if (!resolveAttachmentView) {
150 msaaResource->unref(gpu); 150 msaaResource->unref(gpu);
151 return nullptr; 151 return nullptr;
152 } 152 }
153 } else { 153 } else {
154 // Set color attachment image 154 // Set color attachment image
155 colorImage = imageResource->fImage; 155 colorImage = imageResource->fImage;
156 } 156 }
157 157
158 // Get color attachment view 158 // Get color attachment view
159 const GrVkImageView* colorAttachmentView = GrVkImageView::Create(gpu, colorI mage, pixelFormat, 159 const GrVkImageView* colorAttachmentView = GrVkImageView::Create(gpu, colorI mage, pixelFormat,
160 GrVkImageVi ew::kColor_Type); 160 GrVkImageVi ew::kColor_Type, 1);
161 if (!colorAttachmentView) { 161 if (!colorAttachmentView) {
162 if (msaaResource) { 162 if (msaaResource) {
163 resolveAttachmentView->unref(gpu); 163 resolveAttachmentView->unref(gpu);
164 msaaResource->unref(gpu); 164 msaaResource->unref(gpu);
165 } 165 }
166 return NULL; 166 return NULL;
167 } 167 }
168 168
169 GrVkRenderTarget* texRT; 169 GrVkRenderTarget* texRT;
170 if (msaaResource) { 170 if (msaaResource) {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 398
399 return nullptr; 399 return nullptr;
400 } 400 }
401 401
402 402
403 GrVkGpu* GrVkRenderTarget::getVkGpu() const { 403 GrVkGpu* GrVkRenderTarget::getVkGpu() const {
404 SkASSERT(!this->wasDestroyed()); 404 SkASSERT(!this->wasDestroyed());
405 return static_cast<GrVkGpu*>(this->getGpu()); 405 return static_cast<GrVkGpu*>(this->getGpu());
406 } 406 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.cpp ('k') | src/gpu/vk/GrVkResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698