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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 | 738 |
739 if (kGL_GrGLStandard == standard) { | 739 if (kGL_GrGLStandard == standard) { |
740 glslCaps->fTexelFetchSupport = ctxInfo.glslGeneration() >= k130_GrGLSLGe
neration; | 740 glslCaps->fTexelFetchSupport = ctxInfo.glslGeneration() >= k130_GrGLSLGe
neration; |
741 } else { | 741 } else { |
742 glslCaps->fTexelFetchSupport = | 742 glslCaps->fTexelFetchSupport = |
743 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // We use this va
lue for GLSL ES 3.0. | 743 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // We use this va
lue for GLSL ES 3.0. |
744 } | 744 } |
745 | 745 |
746 if (glslCaps->fTexelFetchSupport) { | 746 if (glslCaps->fTexelFetchSupport) { |
747 if (kGL_GrGLStandard == standard) { | 747 if (kGL_GrGLStandard == standard) { |
748 glslCaps->fTexelBufferSupport = ctxInfo.version() >= GR_GL_VER(4, 3)
&& | 748 glslCaps->fTexelBufferSupport = ctxInfo.version() >= GR_GL_VER(3, 1)
&& |
749 ctxInfo.glslGeneration() >= k330_GrG
LSLGeneration; | 749 ctxInfo.glslGeneration() >= k330_GrG
LSLGeneration; |
750 } else { | 750 } else { |
751 if (ctxInfo.version() >= GR_GL_VER(3, 2) && | 751 if (ctxInfo.version() >= GR_GL_VER(3, 2) && |
752 ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) { | 752 ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) { |
753 glslCaps->fTexelBufferSupport = true; | 753 glslCaps->fTexelBufferSupport = true; |
754 } else if (ctxInfo.hasExtension("GL_OES_texture_buffer")) { | 754 } else if (ctxInfo.hasExtension("GL_OES_texture_buffer")) { |
755 glslCaps->fTexelBufferSupport = true; | 755 glslCaps->fTexelBufferSupport = true; |
756 glslCaps->fTexelBufferExtensionString = "GL_OES_texture_buffer"; | 756 glslCaps->fTexelBufferExtensionString = "GL_OES_texture_buffer"; |
757 } else if (ctxInfo.hasExtension("GL_EXT_texture_buffer")) { | 757 } else if (ctxInfo.hasExtension("GL_EXT_texture_buffer")) { |
758 glslCaps->fTexelBufferSupport = true; | 758 glslCaps->fTexelBufferSupport = true; |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1910 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1910 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
1911 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1911 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
1912 fConfigTable[i].fFormats.fExternalFormat[j]); | 1912 fConfigTable[i].fFormats.fExternalFormat[j]); |
1913 } | 1913 } |
1914 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1914 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
1915 } | 1915 } |
1916 #endif | 1916 #endif |
1917 } | 1917 } |
1918 | 1918 |
1919 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1919 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
OLD | NEW |