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