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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 fFBFetchColorName = NULL; | 935 fFBFetchColorName = NULL; |
936 fFBFetchExtensionString = NULL; | 936 fFBFetchExtensionString = NULL; |
937 } | 937 } |
938 | 938 |
939 GrGLSLCaps::GrGLSLCaps(const GrGLSLCaps& caps) : GrShaderCaps() { | 939 GrGLSLCaps::GrGLSLCaps(const GrGLSLCaps& caps) : GrShaderCaps() { |
940 *this = caps; | 940 *this = caps; |
941 } | 941 } |
942 | 942 |
943 GrGLSLCaps& GrGLSLCaps::operator= (const GrGLSLCaps& caps) { | 943 GrGLSLCaps& GrGLSLCaps::operator= (const GrGLSLCaps& caps) { |
944 INHERITED::operator=(caps); | 944 INHERITED::operator=(caps); |
945 fGLSLGeneration = caps.fGLSLGeneration; | |
946 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide; | 945 fDropsTileOnZeroDivide = caps.fDropsTileOnZeroDivide; |
947 fFBFetchSupport = caps.fFBFetchSupport; | 946 fFBFetchSupport = caps.fFBFetchSupport; |
948 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput; | 947 fFBFetchNeedsCustomOutput = caps.fFBFetchNeedsCustomOutput; |
949 fAdvBlendEqInteraction = caps.fAdvBlendEqInteraction; | 948 fAdvBlendEqInteraction = caps.fAdvBlendEqInteraction; |
950 fFBFetchColorName = caps.fFBFetchColorName; | 949 fFBFetchColorName = caps.fFBFetchColorName; |
951 fFBFetchExtensionString = caps.fFBFetchExtensionString; | 950 fFBFetchExtensionString = caps.fFBFetchExtensionString; |
952 | 951 |
953 return *this; | 952 return *this; |
954 } | 953 } |
955 | 954 |
956 bool GrGLSLCaps::init(const GrGLContextInfo& ctxInfo, | 955 bool GrGLSLCaps::init(const GrGLContextInfo& ctxInfo, |
957 const GrGLInterface* gli, | 956 const GrGLInterface* gli, |
958 const GrGLCaps& glCaps) { | 957 const GrGLCaps& glCaps) { |
959 this->reset(); | 958 this->reset(); |
960 if (!ctxInfo.isInitialized()) { | 959 if (!ctxInfo.isInitialized()) { |
961 return false; | 960 return false; |
962 } | 961 } |
963 | 962 |
964 fGLSLGeneration = ctxInfo.glslGeneration(); | |
965 | |
966 GrGLStandard standard = ctxInfo.standard(); | 963 GrGLStandard standard = ctxInfo.standard(); |
967 GrGLVersion version = ctxInfo.version(); | 964 GrGLVersion version = ctxInfo.version(); |
968 | 965 |
969 /************************************************************************** | 966 /************************************************************************** |
970 * Caps specific to GrGLSLCaps | 967 * Caps specific to GrGLSLCaps |
971 **************************************************************************/ | 968 **************************************************************************/ |
972 | 969 |
973 if (kGLES_GrGLStandard == standard) { | 970 if (kGLES_GrGLStandard == standard) { |
974 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { | 971 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { |
975 fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); | 972 fFBFetchNeedsCustomOutput = (version >= GR_GL_VER(3, 0)); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 if (fGeometryShaderSupport) { | 1149 if (fGeometryShaderSupport) { |
1153 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1150 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1154 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; | 1151 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; |
1155 } | 1152 } |
1156 } | 1153 } |
1157 } | 1154 } |
1158 | 1155 |
1159 | 1156 |
1160 | 1157 |
1161 | 1158 |
OLD | NEW |