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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1537483002: Fixup GL instanced rendering commands (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/GrGLCaps.h ('k') | no next file » | 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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "GrGLCaps.h" 9 #include "GrGLCaps.h"
10 10
(...skipping 21 matching lines...) Expand all
32 fUnpackRowLengthSupport = false; 32 fUnpackRowLengthSupport = false;
33 fUnpackFlipYSupport = false; 33 fUnpackFlipYSupport = false;
34 fPackRowLengthSupport = false; 34 fPackRowLengthSupport = false;
35 fPackFlipYSupport = false; 35 fPackFlipYSupport = false;
36 fTextureUsageSupport = false; 36 fTextureUsageSupport = false;
37 fTexStorageSupport = false; 37 fTexStorageSupport = false;
38 fTextureRedSupport = false; 38 fTextureRedSupport = false;
39 fImagingSupport = false; 39 fImagingSupport = false;
40 fTwoFormatLimit = false; 40 fTwoFormatLimit = false;
41 fVertexArrayObjectSupport = false; 41 fVertexArrayObjectSupport = false;
42 fInstancedDrawingSupport = false;
43 fDirectStateAccessSupport = false; 42 fDirectStateAccessSupport = false;
44 fDebugSupport = false; 43 fDebugSupport = false;
45 fES2CompatibilitySupport = false; 44 fES2CompatibilitySupport = false;
46 fMultisampleDisableSupport = false; 45 fMultisampleDisableSupport = false;
47 fUseNonVBOVertexAndIndexDynamicData = false; 46 fUseNonVBOVertexAndIndexDynamicData = false;
48 fIsCoreProfile = false; 47 fIsCoreProfile = false;
49 fBindFragDataLocationSupport = false; 48 fBindFragDataLocationSupport = false;
50 fExternalTextureSupport = false; 49 fExternalTextureSupport = false;
51 fSRGBWriteControl = false; 50 fSRGBWriteControl = false;
52 fRGBA8888PixelsOpsAreSlow = false; 51 fRGBA8888PixelsOpsAreSlow = false;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 202
204 if (kGL_GrGLStandard == standard) { 203 if (kGL_GrGLStandard == standard) {
205 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || 204 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) ||
206 ctxInfo.hasExtension("GL_ARB_vertex_array_ob ject") || 205 ctxInfo.hasExtension("GL_ARB_vertex_array_ob ject") ||
207 ctxInfo.hasExtension("GL_APPLE_vertex_array_ object"); 206 ctxInfo.hasExtension("GL_APPLE_vertex_array_ object");
208 } else { 207 } else {
209 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || 208 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) ||
210 ctxInfo.hasExtension("GL_OES_vertex_array_ob ject"); 209 ctxInfo.hasExtension("GL_OES_vertex_array_ob ject");
211 } 210 }
212 211
213 if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3,2)) ||
214 (kGLES_GrGLStandard == standard && version >= GR_GL_VER(3,0))) {
215 fInstancedDrawingSupport = true;
216 } else {
217 fInstancedDrawingSupport = (ctxInfo.hasExtension("GL_ARB_draw_instanced" ) ||
218 ctxInfo.hasExtension("GL_EXT_draw_instanced" )) &&
219 (ctxInfo.hasExtension("GL_ARB_instanced_array s") ||
220 ctxInfo.hasExtension("GL_EXT_instanced_array s"));
221 }
222
223 if (kGL_GrGLStandard == standard) { 212 if (kGL_GrGLStandard == standard) {
224 fDirectStateAccessSupport = ctxInfo.hasExtension("GL_EXT_direct_state_ac cess"); 213 fDirectStateAccessSupport = ctxInfo.hasExtension("GL_EXT_direct_state_ac cess");
225 } else { 214 } else {
226 fDirectStateAccessSupport = false; 215 fDirectStateAccessSupport = false;
227 } 216 }
228 217
229 if (kGL_GrGLStandard == standard && version >= GR_GL_VER(4,3)) { 218 if (kGL_GrGLStandard == standard && version >= GR_GL_VER(4,3)) {
230 fDebugSupport = true; 219 fDebugSupport = true;
231 } else { 220 } else {
232 fDebugSupport = ctxInfo.hasExtension("GL_KHR_debug"); 221 fDebugSupport = ctxInfo.hasExtension("GL_KHR_debug");
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO") ); 1199 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO") );
1211 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": " NO")); 1200 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": " NO"));
1212 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); 1201 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO"));
1213 1202
1214 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO" )); 1203 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO" ));
1215 r.appendf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO" )); 1204 r.appendf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO" ));
1216 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); 1205 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO"));
1217 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 1206 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
1218 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 1207 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
1219 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); 1208 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
1220 r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YE S": "NO"));
1221 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO")); 1209 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO"));
1222 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); 1210 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO"));
1223 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ? "YES" : "NO")); 1211 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ? "YES" : "NO"));
1224 r.appendf("Use non-VBO for dynamic data: %s\n", 1212 r.appendf("Use non-VBO for dynamic data: %s\n",
1225 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 1213 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
1226 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); 1214 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO"));
1227 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO")); 1215 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO"));
1228 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO")); 1216 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO"));
1229 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor t ? "YES" : "NO")); 1217 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor t ? "YES" : "NO"));
1230 return r; 1218 return r;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; 1336 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr";
1349 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; 1337 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba";
1350 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; 1338 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba";
1351 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; 1339 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba";
1352 1340
1353 } 1341 }
1354 1342
1355 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1343 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
1356 1344
1357 1345
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698