| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2)
&& | 303 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2)
&& |
| 304 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration; | 304 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration; |
| 305 } | 305 } |
| 306 else { | 306 else { |
| 307 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen
d_func_extended"); | 307 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen
d_func_extended"); |
| 308 | 308 |
| 309 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0
) || | 309 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0
) || |
| 310 ctxInfo.hasExtension("GL_OES_standard_derivatives"); | 310 ctxInfo.hasExtension("GL_OES_standard_derivatives"); |
| 311 } | 311 } |
| 312 | 312 |
| 313 if (kGL_GrGLStandard == standard) { | 313 glslCaps->fProgrammableSampleLocationsSupport = |
| 314 glslCaps->fProgrammableSampleLocationsSupport = | 314 ctxInfo.hasExtension("GL_NV_sample_locations") || |
| 315 ctxInfo.version() >= GR_GL_VER(4, 3) && | 315 ctxInfo.hasExtension("GL_ARB_sample_locations"); |
| 316 (ctxInfo.hasExtension("GL_ARB_sample_locations") || | |
| 317 ctxInfo.hasExtension("GL_NV_sample_locations")); | |
| 318 } else { | |
| 319 glslCaps->fProgrammableSampleLocationsSupport = | |
| 320 ctxInfo.version() >= GR_GL_VER(3, 1) && | |
| 321 ctxInfo.hasExtension("GL_NV_sample_locations"); | |
| 322 } | |
| 323 | 316 |
| 324 /************************************************************************** | 317 /************************************************************************** |
| 325 * GrCaps fields | 318 * GrCaps fields |
| 326 **************************************************************************/ | 319 **************************************************************************/ |
| 327 | 320 |
| 328 // We need dual source blending and the ability to disable multisample in or
der to support mixed | 321 // We need dual source blending and the ability to disable multisample in or
der to support mixed |
| 329 // samples in every corner case. | 322 // samples in every corner case. |
| 330 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) { | 323 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) { |
| 331 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam
ples"); | 324 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam
ples"); |
| 332 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa
mples. | 325 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa
mples. |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; | 1304 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; |
| 1312 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; | 1305 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; |
| 1313 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; | 1306 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; |
| 1314 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; | 1307 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; |
| 1315 | 1308 |
| 1316 } | 1309 } |
| 1317 | 1310 |
| 1318 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1311 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
| 1319 | 1312 |
| 1320 | 1313 |
| OLD | NEW |