On 10/10/2011 11:06 AM, Eric Anholt wrote:
On Thu, 06 Oct 2011 14:40:28 -0700, Ian Romanick<i...@freedesktop.org> wrote:
On 10/06/2011 09:36 AM, Eric Anholt wrote:
These will be used by the FF VS/FS to represent the current attributes
when they don't have an active vertex array.
I just want to make sure I grok this completely. These are arrays of
vec4 uniforms that are used when, for example, glColor is called outside
glBegin. Yes?
Exactly.
If that's the case, what's the advantage of having it in the fragment
shader (as opposed to using uniforms to interpolate the potentially
^^^^^^^^
That should have been "varyings."
constant values)?
Now I'm not grokking what you're suggesting.
There's two ways to get data into the fragment shader. On is using
uniforms, and that's what the current patch is doing. The other is
using varyings. I'm just trying to understand the advantage of one over
the other.
Or is this just a case of keeping the same behavior as the old code?
@@ -284,6 +292,8 @@ const struct gl_builtin_uniform_desc
_mesa_builtin_uniform_desc[] = {
STATEVAR(gl_MESABumpRotMatrix0),
STATEVAR(gl_MESABumpRotMatrix1),
STATEVAR(gl_MESAFogParamsOptimized),
+ STATEVAR(gl_MESACurrentAttribVert),
+ STATEVAR(gl_MESACurrentAttribFrag),
My preference would be to use the "regular" GLSL extension naming
convention (even though we're not exposing these names directly). That
is, gl_CurrentAttribVertMESA and gl_CurrentAttribFragMESA. I would have
made the same comment about the other statevar names here, but I was too
slow getting reviews out.
I'm up for that.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev