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

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

Issue 1847963003: Update vulkan format features in caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review nits 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/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkImage.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 "GrVkGpu.h" 8 #include "GrVkGpu.h"
9 9
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 GrStencilAttachment* GrVkGpu::createStencilAttachmentForRenderTarget(const GrRen derTarget* rt, 644 GrStencilAttachment* GrVkGpu::createStencilAttachmentForRenderTarget(const GrRen derTarget* rt,
645 int width, 645 int width,
646 int height) { 646 int height) {
647 SkASSERT(rt->asTexture()); 647 SkASSERT(rt->asTexture());
648 SkASSERT(width >= rt->width()); 648 SkASSERT(width >= rt->width());
649 SkASSERT(height >= rt->height()); 649 SkASSERT(height >= rt->height());
650 650
651 int samples = rt->numStencilSamples(); 651 int samples = rt->numStencilSamples();
652 652
653 SkASSERT(this->vkCaps().stencilFormats().count()); 653 const GrVkCaps::StencilFormat& sFmt = this->vkCaps().preferedStencilFormat() ;
654 const GrVkCaps::StencilFormat& sFmt = this->vkCaps().stencilFormats()[0];
655 654
656 GrVkStencilAttachment* stencil(GrVkStencilAttachment::Create(this, 655 GrVkStencilAttachment* stencil(GrVkStencilAttachment::Create(this,
657 GrGpuResource:: kCached_LifeCycle, 656 GrGpuResource:: kCached_LifeCycle,
658 width, 657 width,
659 height, 658 height,
660 samples, 659 samples,
661 sFmt)); 660 sFmt));
662 fStats.incStencilAttachmentCreates(); 661 fStats.incStencilAttachmentCreates();
663 return stencil; 662 return stencil;
664 } 663 }
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 aglSwapBuffers(aglGetCurrentContext()); 1433 aglSwapBuffers(aglGetCurrentContext());
1435 int set_a_break_pt_here = 9; 1434 int set_a_break_pt_here = 9;
1436 aglSwapBuffers(aglGetCurrentContext()); 1435 aglSwapBuffers(aglGetCurrentContext());
1437 #elif defined(SK_BUILD_FOR_WIN32) 1436 #elif defined(SK_BUILD_FOR_WIN32)
1438 SwapBuf(); 1437 SwapBuf();
1439 int set_a_break_pt_here = 9; 1438 int set_a_break_pt_here = 9;
1440 SwapBuf(); 1439 SwapBuf();
1441 #endif 1440 #endif
1442 #endif 1441 #endif
1443 } 1442 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkCaps.cpp ('k') | src/gpu/vk/GrVkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698