| 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 glslCaps->fSampleVariablesSupport = ctxInfo.glslGeneration() >= k400_GrG
LSLGeneration; | 675 glslCaps->fSampleVariablesSupport = ctxInfo.glslGeneration() >= k400_GrG
LSLGeneration; |
| 676 } else { | 676 } else { |
| 677 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) { | 677 if (ctxInfo.glslGeneration() >= k320es_GrGLSLGeneration) { |
| 678 glslCaps->fSampleVariablesSupport = true; | 678 glslCaps->fSampleVariablesSupport = true; |
| 679 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) { | 679 } else if (ctxInfo.hasExtension("GL_OES_sample_variables")) { |
| 680 glslCaps->fSampleVariablesSupport = true; | 680 glslCaps->fSampleVariablesSupport = true; |
| 681 glslCaps->fSampleVariablesExtensionString = "GL_OES_sample_variables
"; | 681 glslCaps->fSampleVariablesExtensionString = "GL_OES_sample_variables
"; |
| 682 } | 682 } |
| 683 } | 683 } |
| 684 | 684 |
| 685 if (glslCaps->fSampleVariablesSupport) { | 685 if (glslCaps->fSampleVariablesSupport && |
| 686 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage")) { |
| 687 // Pre-361 NVIDIA has a bug with NV_sample_mask_override_coverage. |
| 686 glslCaps->fSampleMaskOverrideCoverageSupport = | 688 glslCaps->fSampleMaskOverrideCoverageSupport = |
| 687 ctxInfo.hasExtension("GL_NV_sample_mask_override_coverage"); | 689 kNVIDIA_GrGLDriver != ctxInfo.driver() || |
| 690 ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(361,00); |
| 688 } | 691 } |
| 689 | 692 |
| 690 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero
in a shader | 693 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero
in a shader |
| 691 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); | 694 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); |
| 692 | 695 |
| 693 // On the NexusS and GalaxyNexus, the use of 'any' causes the compilation er
ror "Calls to any | 696 // On the NexusS and GalaxyNexus, the use of 'any' causes the compilation er
ror "Calls to any |
| 694 // function that may require a gradient calculation inside a conditional blo
ck may return | 697 // function that may require a gradient calculation inside a conditional blo
ck may return |
| 695 // undefined results". This appears to be an issue with the 'any' call since
even the simple | 698 // undefined results". This appears to be an issue with the 'any' call since
even the simple |
| 696 // "result=black; if (any()) result=white;" code fails to compile. This issu
e comes into play | 699 // "result=black; if (any()) result=white;" code fails to compile. This issu
e comes into play |
| 697 // from our GrTextureDomain processor. | 700 // from our GrTextureDomain processor. |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1903 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1906 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
| 1904 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1907 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
| 1905 fConfigTable[i].fFormats.fExternalFormat[j]); | 1908 fConfigTable[i].fFormats.fExternalFormat[j]); |
| 1906 } | 1909 } |
| 1907 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1910 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
| 1908 } | 1911 } |
| 1909 #endif | 1912 #endif |
| 1910 } | 1913 } |
| 1911 | 1914 |
| 1912 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1915 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
| OLD | NEW |