mesa: Branch 'glsl-compiler-1' - 2 commits

Brian Paul brianp at kemper.freedesktop.org
Sun Feb 25 20:14:36 UTC 2007


 progs/glsl/noise.c          |    1 +
 src/mesa/tnl/t_vb_program.c |    7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
diff-tree 9854a17f292193c9720cf25ab00818ecc210f911 (from 21625d729cc7050fc1b0991e1753b0b5f45a6db0)
Author: Brian <brian at nostromo.localnet.net>
Date:   Sun Feb 25 12:47:25 2007 -0700

    only copy used outputs

diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index 62c78dc..82e007a 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -244,7 +244,7 @@ run_vp( GLcontext *ctx, struct tnl_pipel
 	    const GLuint size = VB->AttribPtr[attr]->size;
 	    const GLuint stride = VB->AttribPtr[attr]->stride;
 	    const GLfloat *data = (GLfloat *) (ptr + stride * i);
-	    COPY_CLEAN_4V(machine.VertAttribs/*Inputs*/[attr], size, data);
+	    COPY_CLEAN_4V(machine.VertAttribs[attr], size, data);
 	 }
       }
 
@@ -264,9 +264,10 @@ run_vp( GLcontext *ctx, struct tnl_pipel
       }
 
       /* copy the output registers into the VB->attribs arrays */
-      /* XXX (optimize) could use a conditional and smaller loop limit here */
       for (attr = 0; attr < VERT_RESULT_MAX; attr++) {
-         COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]);
+         if (program->Base.OutputsWritten & (1 << attr)) {
+            COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]);
+         }
       }
 #if 0
       printf("HPOS: %f %f %f %f\n",
diff-tree 21625d729cc7050fc1b0991e1753b0b5f45a6db0 (from fbc4929185ca1dc7d729ec737095ef0895f5b570)
Author: Brian <brian at nostromo.localnet.net>
Date:   Sun Feb 25 12:46:56 2007 -0700

    output texcoord in vertex program

diff --git a/progs/glsl/noise.c b/progs/glsl/noise.c
index e115da3..a26a805 100644
--- a/progs/glsl/noise.c
+++ b/progs/glsl/noise.c
@@ -17,6 +17,7 @@
 static const char *VertShaderText =
    "void main() {\n"
    "   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
+   "   gl_TexCoord[0] = gl_MultiTexCoord0;\n"
    "}\n";
 
 static const char *FragShaderText =



More information about the mesa-commit mailing list