Mesa (gallium-0.1): mesa: fix swizzle failure, fix typo

Brian Paul brianp at kemper.freedesktop.org
Fri Sep 26 01:22:58 UTC 2008


Module: Mesa
Branch: gallium-0.1
Commit: 006fb638188f083d64a2427cd28979b432622f3e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=006fb638188f083d64a2427cd28979b432622f3e

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Thu Sep 25 18:27:22 2008 -0600

mesa: fix swizzle failure, fix typo

---

 src/mesa/main/texenvprogram.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 6877ef9..c699c43 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -375,7 +375,7 @@ static struct ureg get_tex_temp( struct texenv_fragment_program *p )
 {
    int bit;
    
-   /* First try to find availble temp not previously used (to avoid
+   /* First try to find available temp not previously used (to avoid
     * starting a new texture indirection).  According to the spec, the
     * ~p->temps_output isn't necessary, but will keep it there for
     * now:
@@ -575,14 +575,16 @@ static struct ureg register_const4f( struct texenv_fragment_program *p,
 {
    GLfloat values[4];
    GLuint idx, swizzle;
+   struct ureg r;
    values[0] = s0;
    values[1] = s1;
    values[2] = s2;
    values[3] = s3;
    idx = _mesa_add_unnamed_constant( p->program->Base.Parameters, values, 4,
                                      &swizzle );
-   ASSERT(swizzle == SWIZZLE_NOOP);
-   return make_ureg(PROGRAM_CONSTANT, idx);
+   r = make_ureg(PROGRAM_CONSTANT, idx);
+   r.swz = swizzle;
+   return r;
 }
 
 #define register_scalar_const(p, s0)    register_const4f(p, s0, s0, s0, s0)




More information about the mesa-commit mailing list