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

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

Issue 1414373002: Move shader precision modifier check onto GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 2 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/GrGLGLSL.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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 glslCaps->fFBFetchColorName = "gl_LastFragData[0]"; 85 glslCaps->fFBFetchColorName = "gl_LastFragData[0]";
86 glslCaps->fFBFetchExtensionString = "GL_NV_shader_framebuffer_fetch" ; 86 glslCaps->fFBFetchExtensionString = "GL_NV_shader_framebuffer_fetch" ;
87 } 87 }
88 else if (ctxInfo.hasExtension("GL_ARM_shader_framebuffer_fetch")) { 88 else if (ctxInfo.hasExtension("GL_ARM_shader_framebuffer_fetch")) {
89 // The arm extension also requires an additional flag which we will set onResetContext 89 // The arm extension also requires an additional flag which we will set onResetContext
90 glslCaps->fFBFetchNeedsCustomOutput = false; 90 glslCaps->fFBFetchNeedsCustomOutput = false;
91 glslCaps->fFBFetchSupport = true; 91 glslCaps->fFBFetchSupport = true;
92 glslCaps->fFBFetchColorName = "gl_LastFragColorARM"; 92 glslCaps->fFBFetchColorName = "gl_LastFragColorARM";
93 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch "; 93 glslCaps->fFBFetchExtensionString = "GL_ARM_shader_framebuffer_fetch ";
94 } 94 }
95 glslCaps->fUsesPrecisionModifiers = true;
95 } 96 }
96 97
97 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex ture"); 98 glslCaps->fBindlessTextureSupport = ctxInfo.hasExtension("GL_NV_bindless_tex ture");
98 99
99 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader 100 // Adreno GPUs have a tendency to drop tiles when there is a divide-by-zero in a shader
100 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor(); 101 glslCaps->fDropsTileOnZeroDivide = kQualcomm_GrGLVendor == ctxInfo.vendor();
101 102
102 /************************************************************************** 103 /**************************************************************************
103 * Caps specific to GrGLCaps 104 * Caps specific to GrGLCaps
104 **************************************************************************/ 105 **************************************************************************/
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 1200 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
1200 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = 1201 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] =
1201 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p]; 1202 glslCaps->fFloatPrecisions[kVerte x_GrShaderType][p];
1202 } 1203 }
1203 } 1204 }
1204 } 1205 }
1205 1206
1206 1207
1207 1208
1208 1209
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGLSL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698