mesa: Branch 'master'

Brian Paul brianp at kemper.freedesktop.org
Wed May 2 18:06:43 UTC 2007


 src/mesa/swrast_setup/ss_context.c |    3 ++-
 src/mesa/tnl/t_vertex.c            |   10 +++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

New commits:
diff-tree 5c1b53d58de68582c378e28fbb2fe4c0277139a9 (from b2f1d6422bee5b08513ae83eb4903c0e20593266)
Author: Brian <brian at yutani.localnet.net>
Date:   Wed May 2 12:06:43 2007 -0600

    Document a deficiency in the _swrast_Translate() function with regard to point size.

diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index ccf0eb3..3f6d294 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -263,7 +263,7 @@ _swsetup_Translate( GLcontext *ctx, cons
    dest->win[2] = m[10] * tmp[2] + m[14];
    dest->win[3] =         tmp[3];
 
-
+   /** XXX try to limit these loops someday */
    for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++)
       _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_TEX0+i,
                      dest->attrib[FRAG_ATTRIB_TEX0 + i] );
@@ -284,6 +284,7 @@ _swsetup_Translate( GLcontext *ctx, cons
    _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR_INDEX, tmp );
    dest->index = tmp[0];
 
+   /* XXX See _tnl_get_attr about pointsize ... */
    _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_POINTSIZE, tmp );
    dest->pointSize = tmp[0];
 }
diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c
index c666b38..6aae602 100644
--- a/src/mesa/tnl/t_vertex.c
+++ b/src/mesa/tnl/t_vertex.c
@@ -229,7 +229,15 @@ void _tnl_get_attr( GLcontext *ctx, cons
 
    /* Else return the value from ctx->Current.
     */
-   _mesa_memcpy( dest, ctx->Current.Attrib[attr], 4*sizeof(GLfloat));
+   if (attr == _TNL_ATTRIB_POINTSIZE) {
+      /* If the hardware vertex doesn't have point size then use size from
+       * GLcontext.  XXX this will be wrong if drawing attenuated points!
+       */
+      dest[0] = ctx->Point._Size;
+   }
+   else {
+      _mesa_memcpy( dest, ctx->Current.Attrib[attr], 4*sizeof(GLfloat));
+   }
 }
 
 



More information about the mesa-commit mailing list