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

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

Issue 1744963002: Revert of Implement support for using GL ES 3.0 with command buffer (Closed) Base URL: https://skia.googlesource.com/skia.git@no-texture-rectangle-gles
Patch Set: rebaes 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/GrContextFactory.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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // extension includes glMapBuffer. 356 // extension includes glMapBuffer.
357 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe r_range")) { 357 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_map_buffe r_range")) {
358 fMapBufferFlags |= kSubset_MapFlag; 358 fMapBufferFlags |= kSubset_MapFlag;
359 fMapBufferType = kMapBufferRange_MapBufferType; 359 fMapBufferType = kMapBufferRange_MapBufferType;
360 } else { 360 } else {
361 fMapBufferType = kMapBuffer_MapBufferType; 361 fMapBufferType = kMapBuffer_MapBufferType;
362 } 362 }
363 } else { 363 } else {
364 // Unextended GLES2 doesn't have any buffer mapping. 364 // Unextended GLES2 doesn't have any buffer mapping.
365 fMapBufferFlags = kNone_MapBufferType; 365 fMapBufferFlags = kNone_MapBufferType;
366 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_EXT_map_buffe r_range")) { 366 if (ctxInfo.hasExtension("GL_CHROMIUM_map_sub")) {
367 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
368 fMapBufferType = kChromium_MapBufferType;
369 } else if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_EXT_ma p_buffer_range")) {
367 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag; 370 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
368 fMapBufferType = kMapBufferRange_MapBufferType; 371 fMapBufferType = kMapBufferRange_MapBufferType;
369 } else if (ctxInfo.hasExtension("GL_CHROMIUM_map_sub")) {
370 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
371 fMapBufferType = kChromium_MapBufferType;
372 } else if (ctxInfo.hasExtension("GL_OES_mapbuffer")) { 372 } else if (ctxInfo.hasExtension("GL_OES_mapbuffer")) {
373 fMapBufferFlags = kCanMap_MapFlag; 373 fMapBufferFlags = kCanMap_MapFlag;
374 fMapBufferType = kMapBuffer_MapBufferType; 374 fMapBufferType = kMapBuffer_MapBufferType;
375 } 375 }
376 } 376 }
377 377
378 if (kGL_GrGLStandard == standard) { 378 if (kGL_GrGLStandard == standard) {
379 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_pixel_buf fer_object")) { 379 if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_ARB_pixel_buf fer_object")) {
380 fTransferBufferType = kPBO_TransferBufferType; 380 fTransferBufferType = kPBO_TransferBufferType;
381 } 381 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi rect"); 516 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi rect");
517 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance"); 517 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance");
518 } 518 }
519 519
520 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); 520 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps);
521 521
522 if (contextOptions.fUseShaderSwizzling) { 522 if (contextOptions.fUseShaderSwizzling) {
523 fTextureSwizzleSupport = false; 523 fTextureSwizzleSupport = false;
524 } 524 }
525 525
526 // TODO: remove after command buffer supports full ES 3.0.
527 if (kGLES_GrGLStandard == standard && version >= GR_GL_VER(3, 0) &&
528 kChromium_GrGLDriver == ctxInfo.driver()) {
529 fSupportsInstancedDraws = false;
530 fTextureSwizzleSupport = false;
531 SkASSERT(ctxInfo.hasExtension("GL_CHROMIUM_map_sub"));
532 fMapBufferFlags = kCanMap_MapFlag | kSubset_MapFlag;
533 fMapBufferType = kChromium_MapBufferType;
534 }
535
536 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com patibility have 526 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com patibility have
537 // already been detected. 527 // already been detected.
538 this->initConfigTable(ctxInfo, gli, glslCaps); 528 this->initConfigTable(ctxInfo, gli, glslCaps);
539 529
540 this->applyOptionsOverrides(contextOptions); 530 this->applyOptionsOverrides(contextOptions);
541 glslCaps->applyOptionsOverrides(contextOptions); 531 glslCaps->applyOptionsOverrides(contextOptions);
542 } 532 }
543 533
544 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration generation, 534 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration generation,
545 bool isCoreProfile) { 535 bool isCoreProfile) {
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1802 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1813 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1803 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1814 fConfigTable[i].fFormats.fExternalFormat[j]); 1804 fConfigTable[i].fFormats.fExternalFormat[j]);
1815 } 1805 }
1816 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1806 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1817 } 1807 }
1818 #endif 1808 #endif
1819 } 1809 }
1820 1810
1821 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1811 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/GrContextFactory.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698