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

Brian Paul brianp at kemper.freedesktop.org
Sat Feb 3 18:35:25 UTC 2007


 progs/glsl/Makefile          |   17 ++++++++++++++++-
 src/mesa/main/mtypes.h       |    1 +
 src/mesa/shader/shader_api.c |    8 ++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

New commits:
diff-tree 00d63aafc6d938f13acc9b136ff210fb0bbb15f9 (from 8e0c6fc0be503bc13a2817c7a86c83d1e67e72b0)
Author: Brian <brian at yutani.localnet.net>
Date:   Sat Feb 3 11:35:02 2007 -0700

    added FLUSH_VERTICES() in _mesa_use_program()

diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 1914adb..8429600 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -842,6 +842,14 @@ _mesa_link_program(GLcontext *ctx, GLuin
 void
 _mesa_use_program(GLcontext *ctx, GLuint program)
 {
+   if (ctx->Shader.CurrentProgram &&
+       ctx->Shader.CurrentProgram->Name == program) {
+      /* no-op */
+      return;
+   }
+
+   FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
    /* unbind old */
    if (ctx->Shader.CurrentProgram) {
       ctx->Shader.CurrentProgram->RefCount--;
diff-tree 8e0c6fc0be503bc13a2817c7a86c83d1e67e72b0 (from 68fc4ff1d7f749670684119647e0ef945d23dfa9)
Author: Brian <brian at yutani.localnet.net>
Date:   Sat Feb 3 11:33:13 2007 -0700

    added texdemo1

diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile
index 9ffffea..e08d410 100644
--- a/progs/glsl/Makefile
+++ b/progs/glsl/Makefile
@@ -18,7 +18,8 @@ PROGS = \
 	bump \
 	mandelbrot \
 	noise \
-	toyball
+	toyball \
+	texdemo1
 
 
 ##### RULES #####
@@ -43,6 +44,14 @@ default: $(PROGS)
 extfuncs.h:  $(TOP)/progs/util/extfuncs.h
 	cp $< .
 
+readtex.c: $(TOP)/progs/util/readtex.c
+	cp $< .
+
+readtex.h: $(TOP)/progs/util/readtex.h
+	cp $< .
+
+readtex.o: readtex.c readtex.h
+	$(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
 
 brick.c: extfuncs.h
 
@@ -52,6 +61,12 @@ mandelbrot.c: extfuncs.h
 
 toyball.c: extfuncs.h
 
+texdemo1: texdemo1.o readtex.o
+	$(CC) -I$(INCDIR) $(CFLAGS) texdemo1.o readtex.o $(APP_LIB_DEPS) -o $@
+
+texdemo1.o: texdemo1.c readtex.h extfuncs.h
+	$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
+
 
 clean:
 	-rm -f $(PROGS)
diff-tree 68fc4ff1d7f749670684119647e0ef945d23dfa9 (from fee9bbe4751eb11947c1d739fbf1dd5e352fc433)
Author: Brian <brian at yutani.localnet.net>
Date:   Sat Feb 3 10:31:16 2007 -0700

    Add _NEW_PROGRAM flag to _MESA_NEW_NEED_EYE_COORDS.
    
    This fixes a segfault in the texgen code that can occur after we've
    disabled a vertex program.

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 7cd407a..76b36d6 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2746,6 +2746,7 @@ struct matrix_stack
 #define _MESA_NEW_NEED_EYE_COORDS         (_NEW_LIGHT |		\
                                            _NEW_TEXTURE |	\
                                            _NEW_POINT |		\
+                                           _NEW_PROGRAM |	\
                                            _NEW_MODELVIEW)
 
 #define _MESA_NEW_NEED_NORMALS            (_NEW_LIGHT |		\



More information about the mesa-commit mailing list