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

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

Issue 1202383006: add drawArraysInstanced to caps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 5 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/GrCaps.cpp ('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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) { 441 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) {
442 fOversizedStencilSupport = true; 442 fOversizedStencilSupport = true;
443 } else { 443 } else {
444 SkASSERT(ctxInfo.hasExtension("GL_EXT_framebuffer_object")); 444 SkASSERT(ctxInfo.hasExtension("GL_EXT_framebuffer_object"));
445 } 445 }
446 } else { 446 } else {
447 // ES 3.0 supports mixed size FBO attachments, 2.0 does not. 447 // ES 3.0 supports mixed size FBO attachments, 2.0 does not.
448 fOversizedStencilSupport = ctxInfo.version() >= GR_GL_VER(3, 0); 448 fOversizedStencilSupport = ctxInfo.version() >= GR_GL_VER(3, 0);
449 } 449 }
450 450
451 if (kGL_GrGLStandard == standard) {
452 // 3.1 has draw_instanced but not instanced_arrays, for the time being w e only care about
453 // instanced arrays, but we could make this more granular if we wanted
454 fSupportsInstancedDraws =
455 version >= GR_GL_VER(3, 2) ||
456 (ctxInfo.hasExtension("GL_ARB_draw_instanced") &&
457 ctxInfo.hasExtension("GL_ARB_instanced_arrays"));
458 } else {
459 fSupportsInstancedDraws =
460 version >= GR_GL_VER(3, 0) ||
461 (ctxInfo.hasExtension("GL_EXT_draw_instanced") &&
462 ctxInfo.hasExtension("GL_EXT_instanced_arrays"));
463 }
464
451 this->initConfigTexturableTable(ctxInfo, gli); 465 this->initConfigTexturableTable(ctxInfo, gli);
452 this->initConfigRenderableTable(ctxInfo); 466 this->initConfigRenderableTable(ctxInfo);
453 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); 467 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps);
454 468
455 this->applyOptionsOverrides(contextOptions); 469 this->applyOptionsOverrides(contextOptions);
456 glslCaps->applyOptionsOverrides(contextOptions); 470 glslCaps->applyOptionsOverrides(contextOptions);
457 } 471 }
458 472
459 void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) { 473 void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) {
460 // OpenGL < 3.0 474 // OpenGL < 3.0
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 1172 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
1159 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = 1173 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] =
1160 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p]; 1174 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p];
1161 } 1175 }
1162 } 1176 }
1163 } 1177 }
1164 1178
1165 1179
1166 1180
1167 1181
OLDNEW
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698