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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 119 } |
120 | 120 |
121 if (kGL_GrGLStandard == standard) { | 121 if (kGL_GrGLStandard == standard) { |
122 fTextureBarrierSupport = version >= GR_GL_VER(4,5) || | 122 fTextureBarrierSupport = version >= GR_GL_VER(4,5) || |
123 ctxInfo.hasExtension("GL_ARB_texture_barrier")
|| | 123 ctxInfo.hasExtension("GL_ARB_texture_barrier")
|| |
124 ctxInfo.hasExtension("GL_NV_texture_barrier"); | 124 ctxInfo.hasExtension("GL_NV_texture_barrier"); |
125 } else { | 125 } else { |
126 fTextureBarrierSupport = ctxInfo.hasExtension("GL_NV_texture_barrier"); | 126 fTextureBarrierSupport = ctxInfo.hasExtension("GL_NV_texture_barrier"); |
127 } | 127 } |
128 | 128 |
| 129 if (kGL_GrGLStandard == standard) { |
| 130 fSampleLocationsSupport = version >= GR_GL_VER(3,2) || |
| 131 ctxInfo.hasExtension("GL_ARB_texture_multisamp
le"); |
| 132 } else { |
| 133 fSampleLocationsSupport = version >= GR_GL_VER(3,1); |
| 134 } |
| 135 |
129 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED | 136 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED |
130 // and GL_RG on FBO textures. | 137 // and GL_RG on FBO textures. |
131 if (kMesa_GrGLDriver != ctxInfo.driver()) { | 138 if (kMesa_GrGLDriver != ctxInfo.driver()) { |
132 if (kGL_GrGLStandard == standard) { | 139 if (kGL_GrGLStandard == standard) { |
133 fTextureRedSupport = version >= GR_GL_VER(3,0) || | 140 fTextureRedSupport = version >= GR_GL_VER(3,0) || |
134 ctxInfo.hasExtension("GL_ARB_texture_rg"); | 141 ctxInfo.hasExtension("GL_ARB_texture_rg"); |
135 } else { | 142 } else { |
136 fTextureRedSupport = version >= GR_GL_VER(3,0) || | 143 fTextureRedSupport = version >= GR_GL_VER(3,0) || |
137 ctxInfo.hasExtension("GL_EXT_texture_rg"); | 144 ctxInfo.hasExtension("GL_EXT_texture_rg"); |
138 } | 145 } |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1734 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1741 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
1735 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1742 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
1736 fConfigTable[i].fFormats.fExternalFormat[j]); | 1743 fConfigTable[i].fFormats.fExternalFormat[j]); |
1737 } | 1744 } |
1738 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1745 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
1739 } | 1746 } |
1740 #endif | 1747 #endif |
1741 } | 1748 } |
1742 | 1749 |
1743 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1750 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
OLD | NEW |