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

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

Issue 1812223002: added support for glMinSampleShading (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: updated for Jim's change Created 4 years, 9 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/gl/GrGLTestInterface.cpp ('k') | src/gpu/vk/GrVkPipeline.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 "GrVkCaps.h" 8 #include "GrVkCaps.h"
9 9
10 #include "GrVkUtil.h" 10 #include "GrVkUtil.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 this->initSampleCount(properties); 109 this->initSampleCount(properties);
110 110
111 // Assuming since we will always map in the end to upload the data we might as well just map 111 // Assuming since we will always map in the end to upload the data we might as well just map
112 // from the get go. There is no hard data to suggest this is faster or slowe r. 112 // from the get go. There is no hard data to suggest this is faster or slowe r.
113 fGeometryBufferMapThreshold = 0; 113 fGeometryBufferMapThreshold = 0;
114 114
115 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag; 115 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
116 116
117 fStencilWrapOpsSupport = true; 117 fStencilWrapOpsSupport = true;
118 fOversizedStencilSupport = true; 118 fOversizedStencilSupport = true;
119 fSampleShadingSupport = SkToBool(featureFlags & kSampleRateShading_GrVkFeatu reFlag);
119 } 120 }
120 121
121 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceProperties& properties, 122 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceProperties& properties,
122 uint32_t featureFlags) { 123 uint32_t featureFlags) {
123 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 124 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
124 glslCaps->fVersionDeclString = "#version 310 es\n"; 125 glslCaps->fVersionDeclString = "#version 310 es\n";
125 126
126 // fConfigOutputSwizzle will default to RGBA so we only need to set it for a lpha only config. 127 // fConfigOutputSwizzle will default to RGBA so we only need to set it for a lpha only config.
127 for (int i = 0; i < kGrPixelConfigCnt; ++i) { 128 for (int i = 0; i < kGrPixelConfigCnt; ++i) {
128 GrPixelConfig config = static_cast<GrPixelConfig>(i); 129 GrPixelConfig config = static_cast<GrPixelConfig>(i);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // internal Format stencil bits total bits packed? 270 // internal Format stencil bits total bits packed?
270 gS8 = { VK_FORMAT_S8_UINT, 8, 8, false }, 271 gS8 = { VK_FORMAT_S8_UINT, 8, 8, false },
271 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32, true }; 272 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32, true };
272 273
273 // I'm simply assuming that these two will be supported since they are used in example code. 274 // I'm simply assuming that these two will be supported since they are used in example code.
274 // TODO: Actaully figure this out 275 // TODO: Actaully figure this out
275 SET_CONFIG_CAN_STENCIL(gS8); 276 SET_CONFIG_CAN_STENCIL(gS8);
276 SET_CONFIG_CAN_STENCIL(gD24S8); 277 SET_CONFIG_CAN_STENCIL(gD24S8);
277 } 278 }
278 279
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLTestInterface.cpp ('k') | src/gpu/vk/GrVkPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698