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

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

Issue 2294533002: Add some copy support for vulkan msaa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update initDesc name 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/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkTextureRenderTarget.cpp » ('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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const GrVkImageView* resolveAttachmentView = nullptr; 128 const GrVkImageView* resolveAttachmentView = nullptr;
129 if (desc.fSampleCnt) { 129 if (desc.fSampleCnt) {
130 GrVkImage::ImageDesc msImageDesc; 130 GrVkImage::ImageDesc msImageDesc;
131 msImageDesc.fImageType = VK_IMAGE_TYPE_2D; 131 msImageDesc.fImageType = VK_IMAGE_TYPE_2D;
132 msImageDesc.fFormat = pixelFormat; 132 msImageDesc.fFormat = pixelFormat;
133 msImageDesc.fWidth = desc.fWidth; 133 msImageDesc.fWidth = desc.fWidth;
134 msImageDesc.fHeight = desc.fHeight; 134 msImageDesc.fHeight = desc.fHeight;
135 msImageDesc.fLevels = 1; 135 msImageDesc.fLevels = 1;
136 msImageDesc.fSamples = desc.fSampleCnt; 136 msImageDesc.fSamples = desc.fSampleCnt;
137 msImageDesc.fImageTiling = VK_IMAGE_TILING_OPTIMAL; 137 msImageDesc.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
138 msImageDesc.fUsageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; 138 msImageDesc.fUsageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
139 VK_IMAGE_USAGE_TRANSFER_DST_BIT |
140 VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
139 msImageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; 141 msImageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
140 142
141 if (!GrVkImage::InitImageInfo(gpu, msImageDesc, &msInfo)) { 143 if (!GrVkImage::InitImageInfo(gpu, msImageDesc, &msInfo)) {
142 return nullptr; 144 return nullptr;
143 } 145 }
144 146
145 // Set color attachment image 147 // Set color attachment image
146 colorImage = msInfo.fImage; 148 colorImage = msInfo.fImage;
147 149
148 // Create Resolve attachment view 150 // Create Resolve attachment view
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 375 }
374 376
375 return nullptr; 377 return nullptr;
376 } 378 }
377 379
378 380
379 GrVkGpu* GrVkRenderTarget::getVkGpu() const { 381 GrVkGpu* GrVkRenderTarget::getVkGpu() const {
380 SkASSERT(!this->wasDestroyed()); 382 SkASSERT(!this->wasDestroyed());
381 return static_cast<GrVkGpu*>(this->getGpu()); 383 return static_cast<GrVkGpu*>(this->getGpu());
382 } 384 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkTextureRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698