| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 glslCaps->fMixedSamplesSupport = | 324 glslCaps->fMixedSamplesSupport = |
| 325 ctxInfo.hasExtension("GL_NV_framebuffer_mixed_samples") && | 325 ctxInfo.hasExtension("GL_NV_framebuffer_mixed_samples") && |
| 326 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage") && | 326 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage") && |
| 327 ctxInfo.hasExtension("GL_EXT_raster_multisample"); | 327 ctxInfo.hasExtension("GL_EXT_raster_multisample"); |
| 328 } | 328 } |
| 329 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sample
s. | 329 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sample
s. |
| 330 if (kNVIDIA_GrGLDriver == ctxInfo.driver() && fShaderCaps->mixedSamplesSuppo
rt()) { | 330 if (kNVIDIA_GrGLDriver == ctxInfo.driver() && fShaderCaps->mixedSamplesSuppo
rt()) { |
| 331 fDiscardRenderTargetSupport = false; | 331 fDiscardRenderTargetSupport = false; |
| 332 fInvalidateFBType = kNone_InvalidateFBType; | 332 fInvalidateFBType = kNone_InvalidateFBType; |
| 333 } | 333 } |
| 334 glslCaps->fProgrammableSampleLocationsSupport = | 334 |
| 335 ctxInfo.hasExtension("GL_NV_sample_locations") || | 335 if (kGL_GrGLStandard == standard) { |
| 336 ctxInfo.hasExtension("GL_ARB_sample_locations"); | 336 glslCaps->fProgrammableSampleLocationsSupport = |
| 337 ctxInfo.version() >= GR_GL_VER(4, 3) && |
| 338 (ctxInfo.hasExtension("GL_ARB_sample_locations") || |
| 339 ctxInfo.hasExtension("GL_NV_sample_locations")); |
| 340 } else { |
| 341 glslCaps->fProgrammableSampleLocationsSupport = |
| 342 ctxInfo.version() >= GR_GL_VER(3, 1) && |
| 343 ctxInfo.hasExtension("GL_NV_sample_locations"); |
| 344 } |
| 337 | 345 |
| 338 /************************************************************************** | 346 /************************************************************************** |
| 339 * GrCaps fields | 347 * GrCaps fields |
| 340 **************************************************************************/ | 348 **************************************************************************/ |
| 341 | 349 |
| 342 // fPathRenderingSupport and fMixedSampleSupport must be set before calling
initFSAASupport. | 350 // fPathRenderingSupport and fMixedSampleSupport must be set before calling
initFSAASupport. |
| 343 // Both of these are set in the GrShaderCaps. | 351 // Both of these are set in the GrShaderCaps. |
| 344 this->initFSAASupport(ctxInfo, gli); | 352 this->initFSAASupport(ctxInfo, gli); |
| 345 this->initBlendEqationSupport(ctxInfo); | 353 this->initBlendEqationSupport(ctxInfo); |
| 346 this->initStencilFormats(ctxInfo); | 354 this->initStencilFormats(ctxInfo); |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1284 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1277 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1285 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
| 1278 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1286 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
| 1279 } | 1287 } |
| 1280 } | 1288 } |
| 1281 } | 1289 } |
| 1282 | 1290 |
| 1283 | 1291 |
| 1284 | 1292 |
| 1285 | 1293 |
| OLD | NEW |