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

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

Issue 1906623002: Update min Vulkan version to 1.0.8.0, and fix various bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/GrVkRenderTarget.cpp ('k') | src/gpu/vk/GrVkTexture.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 "GrVkStencilAttachment.h" 8 #include "GrVkStencilAttachment.h"
9 #include "GrVkGpu.h" 9 #include "GrVkGpu.h"
10 #include "GrVkImage.h" 10 #include "GrVkImage.h"
(...skipping 24 matching lines...) Expand all
35 int sampleCnt, 35 int sampleCnt,
36 const Format& format) { 36 const Format& format) {
37 GrVkImage::ImageDesc imageDesc; 37 GrVkImage::ImageDesc imageDesc;
38 imageDesc.fImageType = VK_IMAGE_TYPE_2D; 38 imageDesc.fImageType = VK_IMAGE_TYPE_2D;
39 imageDesc.fFormat = format.fInternalFormat; 39 imageDesc.fFormat = format.fInternalFormat;
40 imageDesc.fWidth = width; 40 imageDesc.fWidth = width;
41 imageDesc.fHeight = height; 41 imageDesc.fHeight = height;
42 imageDesc.fLevels = 1; 42 imageDesc.fLevels = 1;
43 imageDesc.fSamples = sampleCnt; 43 imageDesc.fSamples = sampleCnt;
44 imageDesc.fImageTiling = VK_IMAGE_TILING_OPTIMAL; 44 imageDesc.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
45 imageDesc.fUsageFlags = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; 45 imageDesc.fUsageFlags = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT |
46 VK_IMAGE_USAGE_TRANSFER_DST_BIT;
46 imageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; 47 imageDesc.fMemProps = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
47 48
48 const GrVkImage::Resource* imageResource = GrVkImage::CreateResource(gpu, im ageDesc); 49 const GrVkImage::Resource* imageResource = GrVkImage::CreateResource(gpu, im ageDesc);
49 if (!imageResource) { 50 if (!imageResource) {
50 return nullptr; 51 return nullptr;
51 } 52 }
52 53
53 const GrVkImageView* imageView = GrVkImageView::Create(gpu, imageResource->f Image, 54 const GrVkImageView* imageView = GrVkImageView::Create(gpu, imageResource->f Image,
54 format.fInternalForma t, 55 format.fInternalForma t,
55 GrVkImageView::kStenc il_Type); 56 GrVkImageView::kStenc il_Type);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 this->abandonImage(); 94 this->abandonImage();
94 fStencilView->unrefAndAbandon(); 95 fStencilView->unrefAndAbandon();
95 fStencilView = nullptr; 96 fStencilView = nullptr;
96 GrStencilAttachment::onAbandon(); 97 GrStencilAttachment::onAbandon();
97 } 98 }
98 99
99 GrVkGpu* GrVkStencilAttachment::getVkGpu() const { 100 GrVkGpu* GrVkStencilAttachment::getVkGpu() const {
100 SkASSERT(!this->wasDestroyed()); 101 SkASSERT(!this->wasDestroyed());
101 return static_cast<GrVkGpu*>(this->getGpu()); 102 return static_cast<GrVkGpu*>(this->getGpu());
102 } 103 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkRenderTarget.cpp ('k') | src/gpu/vk/GrVkTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698