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

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

Issue 1583863002: Beginning of support for texture rectangles. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 11 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 | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLDefines.h » ('j') | 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 24 matching lines...) Expand all
35 fImagingSupport = false; 35 fImagingSupport = false;
36 fVertexArrayObjectSupport = false; 36 fVertexArrayObjectSupport = false;
37 fDirectStateAccessSupport = false; 37 fDirectStateAccessSupport = false;
38 fDebugSupport = false; 38 fDebugSupport = false;
39 fES2CompatibilitySupport = false; 39 fES2CompatibilitySupport = false;
40 fMultisampleDisableSupport = false; 40 fMultisampleDisableSupport = false;
41 fUseNonVBOVertexAndIndexDynamicData = false; 41 fUseNonVBOVertexAndIndexDynamicData = false;
42 fIsCoreProfile = false; 42 fIsCoreProfile = false;
43 fBindFragDataLocationSupport = false; 43 fBindFragDataLocationSupport = false;
44 fExternalTextureSupport = false; 44 fExternalTextureSupport = false;
45 fRectangleTextureSupport = false;
45 fTextureSwizzleSupport = false; 46 fTextureSwizzleSupport = false;
46 fSRGBWriteControl = false; 47 fSRGBWriteControl = false;
47 fRGBA8888PixelsOpsAreSlow = false; 48 fRGBA8888PixelsOpsAreSlow = false;
48 fPartialFBOReadIsSlow = false; 49 fPartialFBOReadIsSlow = false;
49 50
50 fShaderCaps.reset(new GrGLSLCaps(contextOptions)); 51 fShaderCaps.reset(new GrGLSLCaps(contextOptions));
51 52
52 this->init(contextOptions, ctxInfo, glInterface); 53 this->init(contextOptions, ctxInfo, glInterface);
53 } 54 }
54 55
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) { 213 if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) {
213 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) { 214 if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) {
214 fExternalTextureSupport = true; 215 fExternalTextureSupport = true;
215 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") || 216 } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") ||
216 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) { 217 ctxInfo.hasExtension("OES_EGL_image_external_essl3")) {
217 // At least one driver has been found that has this extension withou t the "GL_" prefix. 218 // At least one driver has been found that has this extension withou t the "GL_" prefix.
218 fExternalTextureSupport = true; 219 fExternalTextureSupport = true;
219 } 220 }
220 } 221 }
221 222
223 if ((kGL_GrGLStandard == standard && version >= GR_GL_VER(3, 2)) ||
224 ctxInfo.hasExtension("GL_ARB_texture_rectangle")) {
225 fRectangleTextureSupport = true;
226 }
227
222 if (kGL_GrGLStandard == standard) { 228 if (kGL_GrGLStandard == standard) {
223 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) { 229 if (version >= GR_GL_VER(3,3) || ctxInfo.hasExtension("GL_ARB_texture_sw izzle")) {
224 fTextureSwizzleSupport = true; 230 fTextureSwizzleSupport = true;
225 } 231 }
226 } else { 232 } else {
227 if (version >= GR_GL_VER(3,0)) { 233 if (version >= GR_GL_VER(3,0)) {
228 fTextureSwizzleSupport = true; 234 fTextureSwizzleSupport = true;
229 } 235 }
230 } 236 }
231 237
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO")); 899 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ? "YES": "NO"));
894 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO")); 900 r.appendf("Debug support: %s\n", (fDebugSupport ? "YES": "NO"));
895 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ? "YES" : "NO")); 901 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ? "YES" : "NO"));
896 r.appendf("Use non-VBO for dynamic data: %s\n", 902 r.appendf("Use non-VBO for dynamic data: %s\n",
897 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 903 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
898 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO")); 904 r.appendf("SRGB write contol: %s\n", (fSRGBWriteControl ? "YES" : "NO"));
899 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO")); 905 r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO"));
900 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO")); 906 r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO"));
901 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor t ? "YES" : "NO")); 907 r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSuppor t ? "YES" : "NO"));
902 r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES" : "NO")); 908 r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES" : "NO"));
909 r.appendf("Rectangle texture support: %s\n", (fRectangleTextureSupport? "YES " : "NO"));
903 r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" : "NO")); 910 r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" : "NO"));
904 911
905 r.append("Configs\n-------\n"); 912 r.append("Configs\n-------\n");
906 for (int i = 0; i < kGrPixelConfigCnt; ++i) { 913 for (int i = 0; i < kGrPixelConfigCnt; ++i) {
907 r.appendf(" cfg: %d flags: 0x%04x, b_internal: 0x%08x s_internal: 0x%08 x, e_format: " 914 r.appendf(" cfg: %d flags: 0x%04x, b_internal: 0x%08x s_internal: 0x%08 x, e_format: "
908 "0x%08x, e_format_teximage: 0x%08x, e_type: 0x%08x, i_for_texi mage: 0x%08x, " 915 "0x%08x, e_format_teximage: 0x%08x, e_type: 0x%08x, i_for_texi mage: 0x%08x, "
909 "i_for_renderbuffer: 0x%08x\n", 916 "i_for_renderbuffer: 0x%08x\n",
910 i, 917 i,
911 fConfigTable[i].fFlags, 918 fConfigTable[i].fFlags,
912 fConfigTable[i].fFormats.fBaseInternalFormat, 919 fConfigTable[i].fFormats.fBaseInternalFormat,
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1605 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1599 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1606 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1600 fConfigTable[i].fFormats.fExternalFormat[j]); 1607 fConfigTable[i].fFormats.fExternalFormat[j]);
1601 } 1608 }
1602 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1609 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1603 } 1610 }
1604 #endif 1611 #endif
1605 } 1612 }
1606 1613
1607 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1614 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLDefines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698