| 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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 glslCaps->fSampleVariablesSupport = ctxInfo.glslGeneration() >= k400_GrG
LSLGeneration; | 689 glslCaps->fSampleVariablesSupport = ctxInfo.glslGeneration() >= k400_GrG
LSLGeneration; |
| 690 } else { | 690 } else { |
| 691 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) { | 691 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) { |
| 692 glslCaps->fSampleVariablesSupport = true; | 692 glslCaps->fSampleVariablesSupport = true; |
| 693 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) { | 693 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) { |
| 694 glslCaps->fSampleVariablesSupport = true; | 694 glslCaps->fSampleVariablesSupport = true; |
| 695 glslCaps->fSampleVariablesExtensionString = "GL_OES_sample_variables
"; | 695 glslCaps->fSampleVariablesExtensionString = "GL_OES_sample_variables
"; |
| 696 } | 696 } |
| 697 } | 697 } |
| 698 | 698 |
| 699 if (glslCaps->fSampleVariablesSupport) { | 699 if (glslCaps->fSampleVariablesSupport && |
| 700 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage")) { |
| 701 // Pre-361 NVIDIA has a bug with NV_sample_mask_override_coverage. |
| 700 glslCaps->fSampleMaskOverrideCoverageSupport = | 702 glslCaps->fSampleMaskOverrideCoverageSupport = |
| 701 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage"); | 703 kNVIDIA_GrGLDriver != ctxInfo.driver() || |
| 704 ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(361,00); |
| 702 } | 705 } |
| 703 | 706 |
| 704 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero
in a shader | 707 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero
in a shader |
| 705 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); | 708 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); |
| 706 | 709 |
| 707 // On the NexusS and GalaxyNexus, the use of 'any' causes the compilation er
ror "Calls to any | 710 // On the NexusS and GalaxyNexus, the use of 'any' causes the compilation er
ror "Calls to any |
| 708 // function that may require a gradient calculation inside a conditional blo
ck may return | 711 // function that may require a gradient calculation inside a conditional blo
ck may return |
| 709 // undefined results". This appears to be an issue with the 'any' call since
even the simple | 712 // undefined results". This appears to be an issue with the 'any' call since
even the simple |
| 710 // "result=black; if (any()) result=white;" code fails to compile. This issu
e comes into play | 713 // "result=black; if (any()) result=white;" code fails to compile. This issu
e comes into play |
| 711 // from our GrTextureDomain processor. | 714 // from our GrTextureDomain processor. |
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1923 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1926 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
| 1924 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1927 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
| 1925 fConfigTable[i].fFormats.fExternalFormat[j]); | 1928 fConfigTable[i].fFormats.fExternalFormat[j]); |
| 1926 } | 1929 } |
| 1927 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1930 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
| 1928 } | 1931 } |
| 1929 #endif | 1932 #endif |
| 1930 } | 1933 } |
| 1931 | 1934 |
| 1932 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1935 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
| OLD | NEW |