Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1691853003: Do not try to use GL_texture_rectangle on GL ES (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) { 219 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) {
220 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { 220 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) {
221 fExternalTextureSupport = true; 221 fExternalTextureSupport = true;
222 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") || 222 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") ||
223 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) { 223 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) {
224 // At least one driver has been found that has this extension withou t the "GL_" prefix. 224 // At least one driver has been found that has this extension withou t the "GL_" prefix.
225 fExternalTextureSupport = true; 225 fExternalTextureSupport = true;
226 } 226 }
227 } 227 }
228 228
229 if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3, 1)) ||
230 ctxInfo.hasExtension("GL_ARB_texture_rectangle")) {
231 // We also require textureSize() support for rectangle 2D samplers which was added in GLSL
232 // 1.40.
233 if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) {
Kimmo Kinnunen 2016/02/15 07:00:41 Soo.. doesn't this kind of mean that it is disable
234 fRectangleTextureSupport = true;
235 }
236 }
237
238 if (kGL_GrGLStandard == standard) { 229 if (kGL_GrGLStandard == standard) {
230 if (version >= GR_GL_VER(3, 1) || ctxInfo.hasExtension("GL_ARB_texture_r ectangle")) {
231 // We also require textureSize() support for rectangle 2D samplers w hich was added in
232 // GLSL 1.40.
233 if (ctxInfo.glslGeneration() >= k140_GrGLSLGeneration) {
234 fRectangleTextureSupport = true;
235 }
236 }
237 } else {
238 // Command buffer exposes this in GL ES context for Chromium reasons,
239 // but it should not be used. Also, at the time of writing command buffe r
240 // lacks TexImage2D support and ANGLE lacks GL ES 3.0 support.
241 }
242
243 if (kGL_GrGLStandard == standard) {
239 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) { 244 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) {
240 fTextureSwizzleSupport = true; 245 fTextureSwizzleSupport = true;
241 } 246 }
242 } else { 247 } else {
243 if (version >= GR_GL_VER(3,0)) { 248 if (version >= GR_GL_VER(3,0)) {
244 fTextureSwizzleSupport = true; 249 fTextureSwizzleSupport = true;
245 } 250 }
246 } 251 }
247 252
248 #ifdef SK_BUILD_FOR_WIN 253 #ifdef SK_BUILD_FOR_WIN
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1669 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1665 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1670 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1666 fConfigTable[i].fFormats.fExternalFormat[j]); 1671 fConfigTable[i].fFormats.fExternalFormat[j]);
1667 } 1672 }
1668 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1673 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1669 } 1674 }
1670 #endif 1675 #endif
1671 } 1676 }
1672 1677
1673 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1678 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698