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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 glslCaps->fMixedSamplesSupport = | 348 glslCaps->fMixedSamplesSupport = |
349 ctxInfo.hasExtension("GL_NV_framebuffer_mixed_samples") && | 349 ctxInfo.hasExtension("GL_NV_framebuffer_mixed_samples") && |
350 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage") && | 350 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage") && |
351 ctxInfo.hasExtension("GL_EXT_raster_multisample"); | 351 ctxInfo.hasExtension("GL_EXT_raster_multisample"); |
352 } | 352 } |
353 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sample
s. | 353 // Workaround NVIDIA bug related to glInvalidateFramebuffer and mixed sample
s. |
354 if (kNVIDIA_GrGLDriver == ctxInfo.driver() && fShaderCaps->mixedSamplesSuppo
rt()) { | 354 if (kNVIDIA_GrGLDriver == ctxInfo.driver() && fShaderCaps->mixedSamplesSuppo
rt()) { |
355 fDiscardRenderTargetSupport = false; | 355 fDiscardRenderTargetSupport = false; |
356 fInvalidateFBType = kNone_InvalidateFBType; | 356 fInvalidateFBType = kNone_InvalidateFBType; |
357 } | 357 } |
| 358 glslCaps->fProgrammableSampleLocationsSupport = |
| 359 ctxInfo.hasExtension("GL_NV_sample_locations") || |
| 360 ctxInfo.hasExtension("GL_ARB_sample_locations"); |
| 361 |
358 | 362 |
359 /************************************************************************** | 363 /************************************************************************** |
360 * GrCaps fields | 364 * GrCaps fields |
361 **************************************************************************/ | 365 **************************************************************************/ |
362 | 366 |
363 this->initFSAASupport(ctxInfo, gli); | 367 this->initFSAASupport(ctxInfo, gli); |
364 this->initBlendEqationSupport(ctxInfo); | 368 this->initBlendEqationSupport(ctxInfo); |
365 this->initStencilFormats(ctxInfo); | 369 this->initStencilFormats(ctxInfo); |
366 | 370 |
367 if (kGL_GrGLStandard == standard) { | 371 if (kGL_GrGLStandard == standard) { |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1196 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
1193 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1197 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
1194 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1198 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
1195 } | 1199 } |
1196 } | 1200 } |
1197 } | 1201 } |
1198 | 1202 |
1199 | 1203 |
1200 | 1204 |
1201 | 1205 |
OLD | NEW |