| 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 |
| 11 #include "GrGLContext.h" | 11 #include "GrGLContext.h" |
| 12 #include "glsl/GrGLSLCaps.h" | 12 #include "glsl/GrGLSLCaps.h" |
| 13 #include "SkTSearch.h" | 13 #include "SkTSearch.h" |
| 14 #include "SkTSort.h" | 14 #include "SkTSort.h" |
| 15 | 15 |
| 16 GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, | 16 GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, |
| 17 const GrGLContextInfo& ctxInfo, | 17 const GrGLContextInfo& ctxInfo, |
| 18 const GrGLInterface* glInterface) : INHERITED(contextOptions)
{ | 18 const GrGLInterface* glInterface) : INHERITED(contextOptions)
{ |
| 19 fVerifiedColorConfigs.reset(); | 19 fVerifiedColorConfigs.reset(); |
| 20 fStencilFormats.reset(); | 20 fStencilFormats.reset(); |
| 21 fMSFBOType = kNone_MSFBOType; | 21 fMSFBOType = kNone_MSFBOType; |
| 22 fInvalidateFBType = kNone_InvalidateFBType; | 22 fInvalidateFBType = kNone_InvalidateFBType; |
| 23 fLATCAlias = kLATC_LATCAlias; | 23 fLATCAlias = kLATC_LATCAlias; |
| 24 fMapBufferType = kNone_MapBufferType; | 24 fMapBufferType = kNone_MapBufferType; |
| 25 fMaxFragmentUniformVectors = 0; | 25 fMaxFragmentUniformVectors = 0; |
| 26 fMaxVertexAttributes = 0; | 26 fMaxVertexAttributes = 0; |
| 27 fMaxFragmentTextureUnits = 0; | 27 fMaxFragmentTextureUnits = 0; |
| 28 fRGBA8RenderbufferSupport = false; | 28 fRGBA8RenderbufferSupport = false; |
| 29 fBGRAIsInternalFormat = false; | 29 fBGRAIsInternalFormat = false; |
| 30 fTextureSwizzleSupport = false; | |
| 31 fUnpackRowLengthSupport = false; | 30 fUnpackRowLengthSupport = false; |
| 32 fUnpackFlipYSupport = false; | 31 fUnpackFlipYSupport = false; |
| 33 fPackRowLengthSupport = false; | 32 fPackRowLengthSupport = false; |
| 34 fPackFlipYSupport = false; | 33 fPackFlipYSupport = false; |
| 35 fTextureUsageSupport = false; | 34 fTextureUsageSupport = false; |
| 36 fTexStorageSupport = false; | 35 fTexStorageSupport = false; |
| 37 fTextureRedSupport = false; | |
| 38 fImagingSupport = false; | 36 fImagingSupport = false; |
| 39 fTwoFormatLimit = false; | 37 fTwoFormatLimit = false; |
| 40 fFragCoordsConventionSupport = false; | 38 fFragCoordsConventionSupport = false; |
| 41 fVertexArrayObjectSupport = false; | 39 fVertexArrayObjectSupport = false; |
| 42 fInstancedDrawingSupport = false; | 40 fInstancedDrawingSupport = false; |
| 43 fDirectStateAccessSupport = false; | 41 fDirectStateAccessSupport = false; |
| 44 fDebugSupport = false; | 42 fDebugSupport = false; |
| 45 fES2CompatibilitySupport = false; | 43 fES2CompatibilitySupport = false; |
| 46 fMultisampleDisableSupport = false; | 44 fMultisampleDisableSupport = false; |
| 47 fUseNonVBOVertexAndIndexDynamicData = false; | 45 fUseNonVBOVertexAndIndexDynamicData = false; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 85 |
| 88 if (kGL_GrGLStandard == standard) { | 86 if (kGL_GrGLStandard == standard) { |
| 89 fRGBA8RenderbufferSupport = true; | 87 fRGBA8RenderbufferSupport = true; |
| 90 } else { | 88 } else { |
| 91 fRGBA8RenderbufferSupport = version >= GR_GL_VER(3,0) || | 89 fRGBA8RenderbufferSupport = version >= GR_GL_VER(3,0) || |
| 92 ctxInfo.hasExtension("GL_OES_rgb8_rgba8") || | 90 ctxInfo.hasExtension("GL_OES_rgb8_rgba8") || |
| 93 ctxInfo.hasExtension("GL_ARM_rgba8"); | 91 ctxInfo.hasExtension("GL_ARM_rgba8"); |
| 94 } | 92 } |
| 95 | 93 |
| 96 if (kGL_GrGLStandard == standard) { | 94 if (kGL_GrGLStandard == standard) { |
| 97 fTextureSwizzleSupport = version >= GR_GL_VER(3,3) || | |
| 98 ctxInfo.hasExtension("GL_ARB_texture_swizzle"); | |
| 99 } else { | |
| 100 fTextureSwizzleSupport = version >= GR_GL_VER(3,0); | |
| 101 } | |
| 102 | |
| 103 if (kGL_GrGLStandard == standard) { | |
| 104 fUnpackRowLengthSupport = true; | 95 fUnpackRowLengthSupport = true; |
| 105 fUnpackFlipYSupport = false; | 96 fUnpackFlipYSupport = false; |
| 106 fPackRowLengthSupport = true; | 97 fPackRowLengthSupport = true; |
| 107 fPackFlipYSupport = false; | 98 fPackFlipYSupport = false; |
| 108 } else { | 99 } else { |
| 109 fUnpackRowLengthSupport = version >= GR_GL_VER(3,0) || | 100 fUnpackRowLengthSupport = version >= GR_GL_VER(3,0) || |
| 110 ctxInfo.hasExtension("GL_EXT_unpack_subimage")
; | 101 ctxInfo.hasExtension("GL_EXT_unpack_subimage")
; |
| 111 fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy"); | 102 fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy"); |
| 112 fPackRowLengthSupport = version >= GR_GL_VER(3,0) || | 103 fPackRowLengthSupport = version >= GR_GL_VER(3,0) || |
| 113 ctxInfo.hasExtension("GL_NV_pack_subimage"); | 104 ctxInfo.hasExtension("GL_NV_pack_subimage"); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 131 } | 122 } |
| 132 | 123 |
| 133 if (kGL_GrGLStandard == standard) { | 124 if (kGL_GrGLStandard == standard) { |
| 134 fTextureBarrierSupport = version >= GR_GL_VER(4,5) || | 125 fTextureBarrierSupport = version >= GR_GL_VER(4,5) || |
| 135 ctxInfo.hasExtension("GL_ARB_texture_barrier")
|| | 126 ctxInfo.hasExtension("GL_ARB_texture_barrier")
|| |
| 136 ctxInfo.hasExtension("GL_NV_texture_barrier"); | 127 ctxInfo.hasExtension("GL_NV_texture_barrier"); |
| 137 } else { | 128 } else { |
| 138 fTextureBarrierSupport = ctxInfo.hasExtension("GL_NV_texture_barrier"); | 129 fTextureBarrierSupport = ctxInfo.hasExtension("GL_NV_texture_barrier"); |
| 139 } | 130 } |
| 140 | 131 |
| 141 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED | |
| 142 // and GL_RG on FBO textures. | |
| 143 if (kMesa_GrGLDriver != ctxInfo.driver()) { | |
| 144 if (kGL_GrGLStandard == standard) { | |
| 145 fTextureRedSupport = version >= GR_GL_VER(3,0) || | |
| 146 ctxInfo.hasExtension("GL_ARB_texture_rg"); | |
| 147 } else { | |
| 148 fTextureRedSupport = version >= GR_GL_VER(3,0) || | |
| 149 ctxInfo.hasExtension("GL_EXT_texture_rg"); | |
| 150 } | |
| 151 } | |
| 152 fImagingSupport = kGL_GrGLStandard == standard && | 132 fImagingSupport = kGL_GrGLStandard == standard && |
| 153 ctxInfo.hasExtension("GL_ARB_imaging"); | 133 ctxInfo.hasExtension("GL_ARB_imaging"); |
| 154 | 134 |
| 155 // ES 2 only guarantees RGBA/uchar + one other format/type combo for | 135 // ES 2 only guarantees RGBA/uchar + one other format/type combo for |
| 156 // ReadPixels. The other format has to checked at run-time since it | 136 // ReadPixels. The other format has to checked at run-time since it |
| 157 // can change based on which render target is bound | 137 // can change based on which render target is bound |
| 158 fTwoFormatLimit = kGLES_GrGLStandard == standard; | 138 fTwoFormatLimit = kGLES_GrGLStandard == standard; |
| 159 | 139 |
| 160 // We only enable srgb support if both textures and FBOs support srgb. | 140 // We only enable srgb support if both textures and FBOs support srgb. |
| 161 bool srgbSupport = false; | 141 bool srgbSupport = false; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 (ctxInfo.hasExtension("GL_ARB_draw_instanced") && | 462 (ctxInfo.hasExtension("GL_ARB_draw_instanced") && |
| 483 ctxInfo.hasExtension("GL_ARB_instanced_arrays")); | 463 ctxInfo.hasExtension("GL_ARB_instanced_arrays")); |
| 484 } else { | 464 } else { |
| 485 fSupportsInstancedDraws = | 465 fSupportsInstancedDraws = |
| 486 version >= GR_GL_VER(3, 0) || | 466 version >= GR_GL_VER(3, 0) || |
| 487 (ctxInfo.hasExtension("GL_EXT_draw_instanced") && | 467 (ctxInfo.hasExtension("GL_EXT_draw_instanced") && |
| 488 ctxInfo.hasExtension("GL_EXT_instanced_arrays")); | 468 ctxInfo.hasExtension("GL_EXT_instanced_arrays")); |
| 489 } | 469 } |
| 490 | 470 |
| 491 this->initConfigTexturableTable(ctxInfo, gli, srgbSupport); | 471 this->initConfigTexturableTable(ctxInfo, gli, srgbSupport); |
| 472 // initGLSL must be called before this, so that we know if we have GL_RED/R8
support or not |
| 492 this->initConfigRenderableTable(ctxInfo, srgbSupport); | 473 this->initConfigRenderableTable(ctxInfo, srgbSupport); |
| 493 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); | 474 this->initShaderPrecisionTable(ctxInfo, gli, glslCaps); |
| 494 | 475 |
| 495 this->applyOptionsOverrides(contextOptions); | 476 this->applyOptionsOverrides(contextOptions); |
| 496 glslCaps->applyOptionsOverrides(contextOptions); | 477 glslCaps->applyOptionsOverrides(contextOptions); |
| 497 } | 478 } |
| 498 | 479 |
| 499 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration
generation, | 480 const char* get_glsl_version_decl_string(GrGLStandard standard, GrGLSLGeneration
generation, |
| 500 bool isCoreProfile) { | 481 bool isCoreProfile) { |
| 501 switch (generation) { | 482 switch (generation) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 // undefined results". This appears to be an issue with the 'any' call since
even the simple | 565 // undefined results". This appears to be an issue with the 'any' call since
even the simple |
| 585 // "result=black; if (any()) result=white;" code fails to compile. This issu
e comes into play | 566 // "result=black; if (any()) result=white;" code fails to compile. This issu
e comes into play |
| 586 // from our GrTextureDomain processor. | 567 // from our GrTextureDomain processor. |
| 587 glslCaps->fCanUseAnyFunctionInShader = kImagination_GrGLVendor != ctxInfo.ve
ndor(); | 568 glslCaps->fCanUseAnyFunctionInShader = kImagination_GrGLVendor != ctxInfo.ve
ndor(); |
| 588 | 569 |
| 589 glslCaps->fForceHighPrecisionNDSTransform = kARM_GrGLVendor == ctxInfo.vendo
r() || | 570 glslCaps->fForceHighPrecisionNDSTransform = kARM_GrGLVendor == ctxInfo.vendo
r() || |
| 590 kPowerVR54x_GrGLRenderer == ctxI
nfo.renderer(); | 571 kPowerVR54x_GrGLRenderer == ctxI
nfo.renderer(); |
| 591 | 572 |
| 592 glslCaps->fVersionDeclString = get_glsl_version_decl_string(standard, glslCa
ps->fGLSLGeneration, | 573 glslCaps->fVersionDeclString = get_glsl_version_decl_string(standard, glslCa
ps->fGLSLGeneration, |
| 593 fIsCoreProfile); | 574 fIsCoreProfile); |
| 575 |
| 576 if (kGLES_GrGLStandard == standard && k110_GrGLSLGeneration == glslCaps->fGL
SLGeneration) { |
| 577 glslCaps->fShaderDerivativeExtensionString = "GL_OES_standard_derivative
s"; |
| 578 } |
| 579 |
| 580 if (kGL_GrGLStandard == standard) { |
| 581 glslCaps->fTextureSwizzleSupport = version >= GR_GL_VER(3,3) || |
| 582 ctxInfo.hasExtension("GL_ARB_texture_
swizzle"); |
| 583 } else { |
| 584 glslCaps->fTextureSwizzleSupport = version >= GR_GL_VER(3,0); |
| 585 } |
| 586 |
| 587 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED |
| 588 // and GL_RG on FBO textures. |
| 589 if (kMesa_GrGLDriver != ctxInfo.driver()) { |
| 590 if (kGL_GrGLStandard == standard) { |
| 591 glslCaps->fTextureRedSupport = version >= GR_GL_VER(3,0) || |
| 592 ctxInfo.hasExtension("GL_ARB_texture_
rg"); |
| 593 } else { |
| 594 glslCaps->fTextureRedSupport = version >= GR_GL_VER(3,0) || |
| 595 ctxInfo.hasExtension("GL_EXT_texture
_rg"); |
| 596 } |
| 597 } |
| 594 } | 598 } |
| 595 | 599 |
| 596 bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrG
LInterface* gli) { | 600 bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrG
LInterface* gli) { |
| 597 bool hasChromiumPathRendering = ctxInfo.hasExtension("GL_CHROMIUM_path_rende
ring"); | 601 bool hasChromiumPathRendering = ctxInfo.hasExtension("GL_CHROMIUM_path_rende
ring"); |
| 598 | 602 |
| 599 if (!(ctxInfo.hasExtension("GL_NV_path_rendering") || hasChromiumPathRenderi
ng)) { | 603 if (!(ctxInfo.hasExtension("GL_NV_path_rendering") || hasChromiumPathRenderi
ng)) { |
| 600 return false; | 604 return false; |
| 601 } | 605 } |
| 602 | 606 |
| 603 if (kGL_GrGLStandard == ctxInfo.standard()) { | 607 if (kGL_GrGLStandard == ctxInfo.standard()) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 // color renderable: RGBA4, RGB5_A1, RGB565 | 653 // color renderable: RGBA4, RGB5_A1, RGB565 |
| 650 // GL_EXT_texture_rg adds support for R8 as a color render target | 654 // GL_EXT_texture_rg adds support for R8 as a color render target |
| 651 // GL_OES_rgb8_rgba8 and/or GL_ARM_rgba8 adds support for RGBA8 | 655 // GL_OES_rgb8_rgba8 and/or GL_ARM_rgba8 adds support for RGBA8 |
| 652 // GL_EXT_texture_format_BGRA8888 and/or GL_APPLE_texture_format_BGRA8888 a
dded BGRA support | 656 // GL_EXT_texture_format_BGRA8888 and/or GL_APPLE_texture_format_BGRA8888 a
dded BGRA support |
| 653 | 657 |
| 654 // ES 3.0 | 658 // ES 3.0 |
| 655 // Same as ES 2.0 except R8 and RGBA8 are supported without extensions (the
functions called | 659 // Same as ES 2.0 except R8 and RGBA8 are supported without extensions (the
functions called |
| 656 // below already account for this). | 660 // below already account for this). |
| 657 | 661 |
| 658 GrGLStandard standard = ctxInfo.standard(); | 662 GrGLStandard standard = ctxInfo.standard(); |
| 663 GrGLSLCaps* glslCaps = static_cast<GrGLSLCaps*>(fShaderCaps.get()); |
| 659 | 664 |
| 660 enum { | 665 enum { |
| 661 kNo_MSAA = 0, | 666 kNo_MSAA = 0, |
| 662 kYes_MSAA = 1, | 667 kYes_MSAA = 1, |
| 663 }; | 668 }; |
| 664 | 669 |
| 665 if (kGL_GrGLStandard == standard) { | 670 if (kGL_GrGLStandard == standard) { |
| 666 // Post 3.0 we will get R8 | 671 // Post 3.0 we will get R8 |
| 667 // Prior to 3.0 we will get ALPHA8 (with GL_ARB_framebuffer_object) | 672 // Prior to 3.0 we will get ALPHA8 (with GL_ARB_framebuffer_object) |
| 668 if (ctxInfo.version() >= GR_GL_VER(3,0) || | 673 if (ctxInfo.version() >= GR_GL_VER(3,0) || |
| 669 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) { | 674 ctxInfo.hasExtension("GL_ARB_framebuffer_object")) { |
| 670 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kNo_MSAA] = true; | 675 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kNo_MSAA] = true; |
| 671 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kYes_MSAA] = true; | 676 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kYes_MSAA] = true; |
| 672 } | 677 } |
| 673 } else { | 678 } else { |
| 674 // On ES we can only hope for R8 | 679 // On ES we can only hope for R8 |
| 675 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kNo_MSAA] = fTextureRedSupp
ort; | 680 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kNo_MSAA] = glslCaps->fText
ureRedSupport; |
| 676 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kYes_MSAA] = fTextureRedSup
port; | 681 fConfigRenderSupport[kAlpha_8_GrPixelConfig][kYes_MSAA] = glslCaps->fTex
tureRedSupport; |
| 677 } | 682 } |
| 678 | 683 |
| 679 if (kGL_GrGLStandard != standard) { | 684 if (kGL_GrGLStandard != standard) { |
| 680 // only available in ES | 685 // only available in ES |
| 681 fConfigRenderSupport[kRGB_565_GrPixelConfig][kNo_MSAA] = true; | 686 fConfigRenderSupport[kRGB_565_GrPixelConfig][kNo_MSAA] = true; |
| 682 fConfigRenderSupport[kRGB_565_GrPixelConfig][kYes_MSAA] = true; | 687 fConfigRenderSupport[kRGB_565_GrPixelConfig][kYes_MSAA] = true; |
| 683 } | 688 } |
| 684 | 689 |
| 685 // we no longer support 444 as a render target | 690 // we no longer support 444 as a render target |
| 686 fConfigRenderSupport[kRGBA_4444_GrPixelConfig][kNo_MSAA] = false; | 691 fConfigRenderSupport[kRGBA_4444_GrPixelConfig][kNo_MSAA] = false; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 | 736 |
| 732 if (this->isConfigTexturable(kAlpha_half_GrPixelConfig)) { | 737 if (this->isConfigTexturable(kAlpha_half_GrPixelConfig)) { |
| 733 if (kGL_GrGLStandard == standard) { | 738 if (kGL_GrGLStandard == standard) { |
| 734 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true; | 739 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true; |
| 735 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = true; | 740 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = true; |
| 736 } else if (ctxInfo.version() >= GR_GL_VER(3,0)) { | 741 } else if (ctxInfo.version() >= GR_GL_VER(3,0)) { |
| 737 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true; | 742 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true; |
| 738 // for now we don't support floating point MSAA on ES | 743 // for now we don't support floating point MSAA on ES |
| 739 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false; | 744 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false; |
| 740 } else { | 745 } else { |
| 741 if (ctxInfo.hasExtension("GL_EXT_color_buffer_half_float") && fTextu
reRedSupport) { | 746 if (ctxInfo.hasExtension("GL_EXT_color_buffer_half_float") && |
| 747 glslCaps->fTextureRedSupport) { |
| 742 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true
; | 748 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true
; |
| 743 } else { | 749 } else { |
| 744 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = fals
e; | 750 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = fals
e; |
| 745 } | 751 } |
| 746 // for now we don't support floating point MSAA on ES | 752 // for now we don't support floating point MSAA on ES |
| 747 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false; | 753 fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false; |
| 748 } | 754 } |
| 749 } | 755 } |
| 750 | 756 |
| 751 if (this->isConfigTexturable(kRGBA_half_GrPixelConfig)) { | 757 if (this->isConfigTexturable(kRGBA_half_GrPixelConfig)) { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 | 1164 |
| 1159 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); | 1165 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); |
| 1160 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); | 1166 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); |
| 1161 r.appendf("Invalidate FB Type: %s\n", kInvalidateFBTypeStr[fInvalidateFBType
]); | 1167 r.appendf("Invalidate FB Type: %s\n", kInvalidateFBTypeStr[fInvalidateFBType
]); |
| 1162 r.appendf("Map Buffer Type: %s\n", kMapBufferTypeStr[fMapBufferType]); | 1168 r.appendf("Map Buffer Type: %s\n", kMapBufferTypeStr[fMapBufferType]); |
| 1163 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); | 1169 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); |
| 1164 r.appendf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits); | 1170 r.appendf("Max FS Texture Units: %d\n", fMaxFragmentTextureUnits); |
| 1165 r.appendf("Max Vertex Attributes: %d\n", fMaxVertexAttributes); | 1171 r.appendf("Max Vertex Attributes: %d\n", fMaxVertexAttributes); |
| 1166 r.appendf("Support RGBA8 Render Buffer: %s\n", (fRGBA8RenderbufferSupport ?
"YES": "NO")); | 1172 r.appendf("Support RGBA8 Render Buffer: %s\n", (fRGBA8RenderbufferSupport ?
"YES": "NO")); |
| 1167 r.appendf("BGRA is an internal format: %s\n", (fBGRAIsInternalFormat ? "YES"
: "NO")); | 1173 r.appendf("BGRA is an internal format: %s\n", (fBGRAIsInternalFormat ? "YES"
: "NO")); |
| 1168 r.appendf("Support texture swizzle: %s\n", (fTextureSwizzleSupport ? "YES":
"NO")); | |
| 1169 r.appendf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES
": "NO")); | 1174 r.appendf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES
": "NO")); |
| 1170 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO")
); | 1175 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO")
); |
| 1171 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": "
NO")); | 1176 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": "
NO")); |
| 1172 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); | 1177 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); |
| 1173 | 1178 |
| 1174 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO"
)); | 1179 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO"
)); |
| 1175 r.appendf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO"
)); | 1180 r.appendf("Texture Storage support: %s\n", (fTexStorageSupport ? "YES": "NO"
)); |
| 1176 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); | |
| 1177 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 1181 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
| 1178 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 1182 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
| 1179 r.appendf("Fragment coord conventions support: %s\n", | 1183 r.appendf("Fragment coord conventions support: %s\n", |
| 1180 (fFragCoordsConventionSupport ? "YES": "NO")); | 1184 (fFragCoordsConventionSupport ? "YES": "NO")); |
| 1181 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 1185 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
| 1182 r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YE
S": "NO")); | 1186 r.appendf("Instanced drawing support: %s\n", (fInstancedDrawingSupport ? "YE
S": "NO")); |
| 1183 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); | 1187 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); |
| 1184 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); | 1188 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); |
| 1185 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); | 1189 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); |
| 1186 r.appendf("Use non-VBO for dynamic data: %s\n", | 1190 r.appendf("Use non-VBO for dynamic data: %s\n", |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1276 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1273 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1277 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
| 1274 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1278 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
| 1275 } | 1279 } |
| 1276 } | 1280 } |
| 1277 } | 1281 } |
| 1278 | 1282 |
| 1279 | 1283 |
| 1280 | 1284 |
| 1281 | 1285 |
| OLD | NEW |