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

Side by Side Diff: src/gpu/vk/GrVkTextureRenderTarget.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/GrVkRenderTarget.cpp ('k') | tools/gpu/GrTest.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 "GrVkTextureRenderTarget.h" 8 #include "GrVkTextureRenderTarget.h"
9 9
10 #include "GrRenderTargetPriv.h" 10 #include "GrRenderTargetPriv.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const GrVkImageView* resolveAttachmentView = nullptr; 42 const GrVkImageView* resolveAttachmentView = nullptr;
43 if (desc.fSampleCnt) { 43 if (desc.fSampleCnt) {
44 GrVkImage::ImageDesc msImageDesc; 44 GrVkImage::ImageDesc msImageDesc;
45 msImageDesc.fImageType = VK_IMAGE_TYPE_2D; 45 msImageDesc.fImageType = VK_IMAGE_TYPE_2D;
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 VK_IMAGE_USAGE_TRANSFER_DST_BIT |
54 VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
53 msImageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; 55 msImageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
54 56
55 if (!GrVkImage::InitImageInfo(gpu, msImageDesc, &msInfo)) { 57 if (!GrVkImage::InitImageInfo(gpu, msImageDesc, &msInfo)) {
56 imageView->unref(gpu); 58 imageView->unref(gpu);
57 return nullptr; 59 return nullptr;
58 } 60 }
59 61
60 // Set color attachment image 62 // Set color attachment image
61 colorImage = msInfo.fImage; 63 colorImage = msInfo.fImage;
62 64
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return false; 177 return false;
176 } 178 }
177 fColorAttachmentView->unref(gpu); 179 fColorAttachmentView->unref(gpu);
178 fColorAttachmentView = colorAttachmentView; 180 fColorAttachmentView = colorAttachmentView;
179 } 181 }
180 182
181 this->createFramebuffer(gpu); 183 this->createFramebuffer(gpu);
182 return true; 184 return true;
183 } 185 }
184 186
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkRenderTarget.cpp ('k') | tools/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698