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

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

Issue 22856006: Recognize that ES3 supports texture storage. Add workaround for apparent Adreno bug. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/gl/GrGLInterface.cpp » ('j') | src/gpu/gl/GrGLInterface.cpp » ('J')
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 #include "GrGLContext.h" 10 #include "GrGLContext.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy"); 152 fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy");
153 fPackRowLengthSupport = version >= GR_GL_VER(3,0) || 153 fPackRowLengthSupport = version >= GR_GL_VER(3,0) ||
154 ctxInfo.hasExtension("GL_NV_pack_subimage"); 154 ctxInfo.hasExtension("GL_NV_pack_subimage");
155 fPackFlipYSupport = 155 fPackFlipYSupport =
156 ctxInfo.hasExtension("GL_ANGLE_pack_reverse_row_order"); 156 ctxInfo.hasExtension("GL_ANGLE_pack_reverse_row_order");
157 } 157 }
158 158
159 fTextureUsageSupport = (kES_GrGLBinding == binding) && 159 fTextureUsageSupport = (kES_GrGLBinding == binding) &&
160 ctxInfo.hasExtension("GL_ANGLE_texture_usage"); 160 ctxInfo.hasExtension("GL_ANGLE_texture_usage");
161 161
162 // Tex storage is in desktop 4.2 and can be an extension to desktop or ES. 162 if (kDesktop_GrGLBinding == binding) {
163 fTexStorageSupport = (kDesktop_GrGLBinding == binding && 163 // The EXT version can apply to either GL or GLES.
164 version >= GR_GL_VER(4,2)) || 164 fTexStorageSupport = version >= GR_GL_VER(4,2) ||
165 ctxInfo.hasExtension("GL_ARB_texture_storage") || 165 ctxInfo.hasExtension("GL_ARB_texture_storage") ||
166 ctxInfo.hasExtension("GL_EXT_texture_storage"); 166 ctxInfo.hasExtension("GL_EXT_texture_storage");
167 } else {
168 // Qualcomm Adreno drivers appear to have issues with texture storage.
169 fTexStorageSupport = (version >= GR_GL_VER(3,0) &&
170 kQualcomm_GrGLVendor != ctxInfo.vendor()) ||
171 ctxInfo.hasExtension("GL_EXT_texture_storage");
172 }
167 173
168 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support it if 174 // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support it if
169 // it doesn't have ARB_texture_rg extension. 175 // it doesn't have ARB_texture_rg extension.
170 if (kDesktop_GrGLBinding == binding) { 176 if (kDesktop_GrGLBinding == binding) {
171 if (ctxInfo.isMesa()) { 177 if (ctxInfo.isMesa()) {
172 fTextureRedSupport = ctxInfo.hasExtension("GL_ARB_texture_rg"); 178 fTextureRedSupport = ctxInfo.hasExtension("GL_ARB_texture_rg");
173 } else { 179 } else {
174 fTextureRedSupport = version >= GR_GL_VER(3,0) || 180 fTextureRedSupport = version >= GR_GL_VER(3,0) ||
175 ctxInfo.hasExtension("GL_ARB_texture_rg"); 181 ctxInfo.hasExtension("GL_ARB_texture_rg");
176 } 182 }
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); 600 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO"));
595 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 601 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
596 GrPrintf("Fragment coord conventions support: %s\n", 602 GrPrintf("Fragment coord conventions support: %s\n",
597 (fFragCoordsConventionSupport ? "YES": "NO")); 603 (fFragCoordsConventionSupport ? "YES": "NO"));
598 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO")); 604 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? " YES": "NO"));
599 GrPrintf("Use non-VBO for dynamic data: %s\n", 605 GrPrintf("Use non-VBO for dynamic data: %s\n",
600 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 606 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
601 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); 607 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO"));
602 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO")); 608 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : " NO"));
603 } 609 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLInterface.cpp » ('j') | src/gpu/gl/GrGLInterface.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698