OLD | NEW |
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi
rect"); | 526 fMultiDrawIndirectSupport = ctxInfo.hasExtension("GL_EXT_multi_draw_indi
rect"); |
527 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance"); | 527 fBaseInstanceSupport = ctxInfo.hasExtension("GL_EXT_base_instance"); |
528 } | 528 } |
529 | 529 |
530 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); | 530 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); |
531 | 531 |
532 if (contextOptions.fUseShaderSwizzling) { | 532 if (contextOptions.fUseShaderSwizzling) { |
533 fTextureSwizzleSupport = false; | 533 fTextureSwizzleSupport = false; |
534 } | 534 } |
535 | 535 |
| 536 if (kGL_GrGLStandard == standard) { |
| 537 if (version >= GR_GL_VER(4, 0) || ctxInfo.hasExtension("GL_ARB_sample_sh
ading")) { |
| 538 fSampleShadingSupport = true; |
| 539 } |
| 540 } else if (ctxInfo.hasExtension("GL_OES_sample_shading")) { |
| 541 fSampleShadingSupport = true; |
| 542 } |
| 543 |
536 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com
patibility have | 544 // Requires fTextureRedSupport, fTextureSwizzleSupport, msaa support, ES com
patibility have |
537 // already been detected. | 545 // already been detected. |
538 this->initConfigTable(ctxInfo, gli, glslCaps); | 546 this->initConfigTable(ctxInfo, gli, glslCaps); |
539 | 547 |
540 this->applyOptionsOverrides(contextOptions); | 548 this->applyOptionsOverrides(contextOptions); |
541 glslCaps->applyOptionsOverrides(contextOptions); | 549 glslCaps->applyOptionsOverrides(contextOptions); |
542 } | 550 } |
543 | 551 |
544 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration
generation, | 552 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration
generation, |
545 bool isCoreProfile) { | 553 bool isCoreProfile) { |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1873 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
1866 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1874 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
1867 fConfigTable[i].fFormats.fExternalFormat[j]); | 1875 fConfigTable[i].fFormats.fExternalFormat[j]); |
1868 } | 1876 } |
1869 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1877 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
1870 } | 1878 } |
1871 #endif | 1879 #endif |
1872 } | 1880 } |
1873 | 1881 |
1874 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1882 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
OLD | NEW |