| 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 glslCaps->fProgrammableSampleLocationsSupport = | |
| 314 ctxInfo.hasExtension("GL_NV_sample_locations") || | |
| 315 ctxInfo.hasExtension("GL_ARB_sample_locations"); | |
| 316 | |
| 317 /************************************************************************** | 313 /************************************************************************** |
| 318 * GrCaps fields | 314 * GrCaps fields |
| 319 **************************************************************************/ | 315 **************************************************************************/ |
| 320 | 316 |
| 321 // We need dual source blending and the ability to disable multisample in or
der to support mixed | 317 // We need dual source blending and the ability to disable multisample in or
der to support mixed |
| 322 // samples in every corner case. | 318 // samples in every corner case. |
| 323 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) { | 319 if (fMultisampleDisableSupport && glslCaps->dualSourceBlendingSupport()) { |
| 324 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam
ples"); | 320 fMixedSamplesSupport = ctxInfo.hasExtension("GL_NV_framebuffer_mixed_sam
ples"); |
| 325 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa
mples. | 321 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sa
mples. |
| 326 if (fMixedSamplesSupport && kNVIDIA_GrGLDriver == ctxInfo.driver()) { | 322 if (fMixedSamplesSupport && kNVIDIA_GrGLDriver == ctxInfo.driver()) { |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; | 1300 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; |
| 1305 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; | 1301 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; |
| 1306 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; | 1302 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; |
| 1307 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; | 1303 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; |
| 1308 | 1304 |
| 1309 } | 1305 } |
| 1310 | 1306 |
| 1311 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1307 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
| 1312 | 1308 |
| 1313 | 1309 |
| OLD | NEW |