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

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

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: asserts 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/GrGLVertexBuffer.cpp ('k') | src/gpu/vk/GrVkGpu.h » ('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 11 matching lines...) Expand all
22 fStencilWrapOpsSupport = false; //TODO: figure this out 22 fStencilWrapOpsSupport = false; //TODO: figure this out
23 fDiscardRenderTargetSupport = false; //TODO: figure this out 23 fDiscardRenderTargetSupport = false; //TODO: figure this out
24 fReuseScratchTextures = true; //TODO: figure this out 24 fReuseScratchTextures = true; //TODO: figure this out
25 fGpuTracingSupport = false; //TODO: figure this out 25 fGpuTracingSupport = false; //TODO: figure this out
26 fCompressedTexSubImageSupport = false; //TODO: figure this out 26 fCompressedTexSubImageSupport = false; //TODO: figure this out
27 fOversizedStencilSupport = false; //TODO: figure this out 27 fOversizedStencilSupport = false; //TODO: figure this out
28 28
29 fUseDrawInsteadOfClear = false; //TODO: figure this out 29 fUseDrawInsteadOfClear = false; //TODO: figure this out
30 30
31 fMapBufferFlags = kNone_MapFlags; //TODO: figure this out 31 fMapBufferFlags = kNone_MapFlags; //TODO: figure this out
32 fGeometryBufferMapThreshold = SK_MaxS32; //TODO: figure this out 32 fBufferMapThreshold = SK_MaxS32; //TODO: figure this out
33 33
34 fMaxRenderTargetSize = 4096; // minimum required by spec 34 fMaxRenderTargetSize = 4096; // minimum required by spec
35 fMaxTextureSize = 4096; // minimum required by spec 35 fMaxTextureSize = 4096; // minimum required by spec
36 fMaxColorSampleCount = 4; // minimum required by spec 36 fMaxColorSampleCount = 4; // minimum required by spec
37 fMaxStencilSampleCount = 4; // minimum required by spec 37 fMaxStencilSampleCount = 4; // minimum required by spec
38 38
39 39
40 fShaderCaps.reset(new GrGLSLCaps(contextOptions)); 40 fShaderCaps.reset(new GrGLSLCaps(contextOptions));
41 41
42 this->init(contextOptions, vkInterface, physDev); 42 this->init(contextOptions, vkInterface, physDev);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 fMaxVertexAttributes = properties.limits.maxVertexInputAttributes; 105 fMaxVertexAttributes = properties.limits.maxVertexInputAttributes;
106 // We could actually query and get a max size for each config, however maxIm ageDimension2D will 106 // We could actually query and get a max size for each config, however maxIm ageDimension2D will
107 // give the minimum max size across all configs. So for simplicity we will u se that for now. 107 // give the minimum max size across all configs. So for simplicity we will u se that for now.
108 fMaxRenderTargetSize = properties.limits.maxImageDimension2D; 108 fMaxRenderTargetSize = properties.limits.maxImageDimension2D;
109 fMaxTextureSize = properties.limits.maxImageDimension2D; 109 fMaxTextureSize = properties.limits.maxImageDimension2D;
110 110
111 this->initSampleCount(properties); 111 this->initSampleCount(properties);
112 112
113 // Assuming since we will always map in the end to upload the data we might as well just map 113 // Assuming since we will always map in the end to upload the data we might as well just map
114 // from the get go. There is no hard data to suggest this is faster or slowe r. 114 // from the get go. There is no hard data to suggest this is faster or slowe r.
115 fGeometryBufferMapThreshold = 0; 115 fBufferMapThreshold = 0;
116 116
117 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag; 117 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
118 118
119 fStencilWrapOpsSupport = true; 119 fStencilWrapOpsSupport = true;
120 fOversizedStencilSupport = true; 120 fOversizedStencilSupport = true;
121 } 121 }
122 122
123 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceFeatures& features, 123 void GrVkCaps::initGLSLCaps(const VkPhysicalDeviceFeatures& features,
124 const VkPhysicalDeviceProperties& properties) { 124 const VkPhysicalDeviceProperties& properties) {
125 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); 125 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get());
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // internal Format stencil bits total bits packed? 271 // internal Format stencil bits total bits packed?
272 gS8 = { VK_FORMAT_S8_UINT, 8, 8, false }, 272 gS8 = { VK_FORMAT_S8_UINT, 8, 8, false },
273 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32, true }; 273 gD24S8 = { VK_FORMAT_D24_UNORM_S8_UINT, 8, 32, true };
274 274
275 // I'm simply assuming that these two will be supported since they are used in example code. 275 // I'm simply assuming that these two will be supported since they are used in example code.
276 // TODO: Actaully figure this out 276 // TODO: Actaully figure this out
277 SET_CONFIG_CAN_STENCIL(gS8); 277 SET_CONFIG_CAN_STENCIL(gS8);
278 SET_CONFIG_CAN_STENCIL(gD24S8); 278 SET_CONFIG_CAN_STENCIL(gD24S8);
279 } 279 }
280 280
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLVertexBuffer.cpp ('k') | src/gpu/vk/GrVkGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698