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

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

Issue 1674813004: Revert of Improve GLSL integer support (Closed) Base URL: https://skia.googlesource.com/skia.git@uploat_dratindirect
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 | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 // Enable supported shader-related caps 273 // Enable supported shader-related caps
274 if (kGL_GrGLStandard == standard) { 274 if (kGL_GrGLStandard == standard) {
275 glslCaps->fDualSourceBlendingSupport = (ctxInfo.version() >= GR_GL_VER(3 , 3) || 275 glslCaps->fDualSourceBlendingSupport = (ctxInfo.version() >= GR_GL_VER(3 , 3) ||
276 ctxInfo.hasExtension("GL_ARB_blend_func_extended")) && 276 ctxInfo.hasExtension("GL_ARB_blend_func_extended")) &&
277 GrGLSLSupportsNamedFragmentShaderOutputs(ctxInfo.glslGeneration()); 277 GrGLSLSupportsNamedFragmentShaderOutputs(ctxInfo.glslGeneration());
278 glslCaps->fShaderDerivativeSupport = true; 278 glslCaps->fShaderDerivativeSupport = true;
279 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS 279 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS
280 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) && 280 glslCaps->fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3, 2) &&
281 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration; 281 ctxInfo.glslGeneration() >= k150_GrGLSLGeneration;
282 glslCaps->fIntegerSupport = ctxInfo.version() >= GR_GL_VER(3, 0) &&
283 ctxInfo.glslGeneration() >= k130_GrGLSLGeneration;
284 } 282 }
285 else { 283 else {
286 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended"); 284 glslCaps->fDualSourceBlendingSupport = ctxInfo.hasExtension("GL_EXT_blen d_func_extended");
287 285
288 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) || 286 glslCaps->fShaderDerivativeSupport = ctxInfo.version() >= GR_GL_VER(3, 0 ) ||
289 ctxInfo.hasExtension("GL_OES_standard_derivatives"); 287 ctxInfo.hasExtension("GL_OES_standard_derivatives");
290
291 glslCaps->fIntegerSupport = ctxInfo.version() >= GR_GL_VER(3, 0) &&
292 ctxInfo.glslGeneration() >= k330_GrGLSLGeneration; // We use this va lue for GLSL ES 3.0.
293 } 288 }
294 289
295 if (ctxInfo.hasExtension("GL_EXT_shader_pixel_local_storage")) { 290 if (ctxInfo.hasExtension("GL_EXT_shader_pixel_local_storage")) {
296 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 291 #define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
297 GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT, 292 GR_GL_GetIntegerv(gli, GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT,
298 &glslCaps->fPixelLocalStorageSize); 293 &glslCaps->fPixelLocalStorageSize);
299 glslCaps->fPLSPathRenderingSupport = glslCaps->fFBFetchSupport; 294 glslCaps->fPLSPathRenderingSupport = glslCaps->fFBFetchSupport;
300 } 295 }
301 else { 296 else {
302 glslCaps->fPixelLocalStorageSize = 0; 297 glslCaps->fPixelLocalStorageSize = 0;
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { 1660 for (int j = 0; j < kExternalFormatUsageCnt; ++j) {
1666 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != 1661 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] !=
1667 fConfigTable[i].fFormats.fExternalFormat[j]); 1662 fConfigTable[i].fFormats.fExternalFormat[j]);
1668 } 1663 }
1669 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType); 1664 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats .fExternalType);
1670 } 1665 }
1671 #endif 1666 #endif
1672 } 1667 }
1673 1668
1674 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} 1669 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {}
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLAssembleInterface.cpp ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698