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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 else if (ctxInfo.hasExtension("GL_ARM_shader_framebuffer_fetch")) { | 650 else if (ctxInfo.hasExtension("GL_ARM_shader_framebuffer_fetch")) { |
651 // The arm extension also requires an additional flag which we will
set onResetContext | 651 // The arm extension also requires an additional flag which we will
set onResetContext |
652 glslCaps->fFBFetchNeedsCustomOutput = false; | 652 glslCaps->fFBFetchNeedsCustomOutput = false; |
653 glslCaps->fFBFetchSupport = true; | 653 glslCaps->fFBFetchSupport = true; |
654 glslCaps->fFBFetchColorName = "gl_LastFragColorARM"; | 654 glslCaps->fFBFetchColorName = "gl_LastFragColorARM"; |
655 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch
"; | 655 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch
"; |
656 } | 656 } |
657 glslCaps->fUsesPrecisionModifiers = true; | 657 glslCaps->fUsesPrecisionModifiers = true; |
658 } | 658 } |
659 | 659 |
| 660 // Currently the extension is advertised but fb fetch is broken on 500 serie
s Adrenos like the |
| 661 // Galaxy S7. |
| 662 // TODO: Once this is fixed we can update the check here to look at a driver
version number too. |
| 663 if (kAdreno5xx_GrGLRenderer == ctxInfo.renderer()) { |
| 664 glslCaps->fFBFetchSupport = false; |
| 665 } |
| 666 |
660 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex
ture"); | 667 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex
ture"); |
661 | 668 |
662 if (kGL_GrGLStandard == standard) { | 669 if (kGL_GrGLStandard == standard) { |
663 glslCaps->fFlatInterpolationSupport = ctxInfo.glslGeneration() >= k130_G
rGLSLGeneration; | 670 glslCaps->fFlatInterpolationSupport = ctxInfo.glslGeneration() >= k130_G
rGLSLGeneration; |
664 } else { | 671 } else { |
665 glslCaps->fFlatInterpolationSupport = | 672 glslCaps->fFlatInterpolationSupport = |
666 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // This is the va
lue for GLSL ES 3.0. | 673 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // This is the va
lue for GLSL ES 3.0. |
667 } | 674 } |
668 | 675 |
669 if (kGL_GrGLStandard == standard) { | 676 if (kGL_GrGLStandard == standard) { |
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { | 1961 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { |
1955 if (options.fEnableInstancedRendering) { | 1962 if (options.fEnableInstancedRendering) { |
1956 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th
is); | 1963 fInstancedSupport = gr_instanced::GLInstancedRendering::CheckSupport(*th
is); |
1957 #ifndef SK_BUILD_FOR_MAC | 1964 #ifndef SK_BUILD_FOR_MAC |
1958 // OS X doesn't seem to write correctly to floating point textures when
using | 1965 // OS X doesn't seem to write correctly to floating point textures when
using |
1959 // glDraw*Indirect, regardless of the underlying GPU. | 1966 // glDraw*Indirect, regardless of the underlying GPU. |
1960 fAvoidInstancedDrawsToFPTargets = true; | 1967 fAvoidInstancedDrawsToFPTargets = true; |
1961 #endif | 1968 #endif |
1962 } | 1969 } |
1963 } | 1970 } |
OLD | NEW |