I want to be able to keep one copy of each uniform (even if it ...
12 years, 4 months ago
(2012-07-11 21:17:32 UTC)
#1
I want to be able to keep one copy of each uniform (even if it is visible in
multiple shaders).
This will cause "mediump" to be emitted in the fragment shader on unis that are
also in the frag. It's redundant since we set the default precision to mediump.
But that seems acceptable to me.
12 years, 4 months ago
(2012-07-12 14:53:37 UTC)
#3
http://codereview.appspot.com/6392049/diff/1/src/gpu/gl/GrGLShaderBuilder.cpp
File src/gpu/gl/GrGLShaderBuilder.cpp (right):
http://codereview.appspot.com/6392049/diff/1/src/gpu/gl/GrGLShaderBuilder.cpp...
src/gpu/gl/GrGLShaderBuilder.cpp:203: inline void
append_default_precision_qualifier(GrGLShaderVar::Precision p,
On 2012/07/12 14:42:01, TomH wrote:
> I think "default" doesn't belong in this name?
I got the name from the GLSL spec:
The precision statement
precision precision-qualifier type;
can be used to establish a default precision qualifier
http://codereview.appspot.com/6392049/diff/1/src/gpu/gl/GrGLShaderBuilder.cpp...
src/gpu/gl/GrGLShaderBuilder.cpp:206: // Desktop GLSL has added precision
qualifiers but they don't do anything.
On 2012/07/12 14:42:01, TomH wrote:
> Is that a good enough reason not to emit them?
I think so. Today we only emit the qualifiers in order for our shaders to
compile. If we get to the point where we've actually decided the max precision
we require for various computations then the qualifiers would have some meaning
and it might make sense to always emit them.
Issue 6392049: Refactor how precision is handled with GrGLShaderVar
(Closed)
Created 12 years, 4 months ago by bsalomon
Modified 12 years, 3 months ago
Reviewers: TomH
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 4