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

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

Issue 2038743002: Support ARB extensions for indirect drawing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLInterface.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 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 (ctxInfo.hasExtension("GL_ARB_draw_instanced") && 511 (ctxInfo.hasExtension("GL_ARB_draw_instanced") &&
512 ctxInfo.hasExtension("GL_ARB_instanced_arrays")); 512 ctxInfo.hasExtension("GL_ARB_instanced_arrays"));
513 } else { 513 } else {
514 fSupportsInstancedDraws = 514 fSupportsInstancedDraws =
515 version >= GR_GL_VER(3, 0) || 515 version >= GR_GL_VER(3, 0) ||
516 (ctxInfo.hasExtension("GL_EXT_draw_instanced") && 516 (ctxInfo.hasExtension("GL_EXT_draw_instanced") &&
517 ctxInfo.hasExtension("GL_EXT_instanced_arrays")); 517 ctxInfo.hasExtension("GL_EXT_instanced_arrays"));
518 } 518 }
519 519
520 if (kGL_GrGLStandard == standard) { 520 if (kGL_GrGLStandard == standard) {
521 // We don't use ARB_draw_indirect because it does not support a base ins tance. 521 fDrawIndirectSupport = version >= GR_GL_VER(4,0) ||
522 // We don't use ARB_multi_draw_indirect because it does not support GL_D RAW_INDIRECT_BUFFER. 522 ctxInfo.hasExtension("GL_ARB_draw_indirect");
523 fDrawIndirectSupport = 523 fBaseInstanceSupport = version >= GR_GL_VER(4,2);
524 fMultiDrawIndirectSupport = fBaseInstanceSupport = version >= GR_GL_ VER(4,3); 524 fMultiDrawIndirectSupport = version >= GR_GL_VER(4,3) ||
525 (!fBaseInstanceSupport && // The ARB extensi on has no base inst.
526 ctxInfo.hasExtension("GL_ARB_multi_draw_ind irect"));
525 } else { 527 } else {
526 fDrawIndirectSupport = version >= GR_GL_VER(3,1); 528 fDrawIndirectSupport = version >= GR_GL_VER(3,1);
527 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi rect"); 529 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi rect");
528 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance"); 530 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance");
529 } 531 }
530 532
531 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); 533 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps);
532 534
533 if (contextOptions.fUseShaderSwizzling) { 535 if (contextOptions.fUseShaderSwizzling) {
534 fTextureSwizzleSupport = false; 536 fTextureSwizzleSupport = false;
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1912 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1911 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1913 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1912 fConfigTable[i].fFormats.fExternalFormat[j]); 1914 fConfigTable[i].fFormats.fExternalFormat[j]);
1913 } 1915 }
1914 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1916 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1915 } 1917 }
1916 #endif 1918 #endif
1917 } 1919 }
1918 1920
1919 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1921 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698