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

Brian Paul brianp at kemper.freedesktop.org
Thu Feb 22 08:10:53 PST 2007


 src/mesa/shader/prog_print.c     |    3 +--
 src/mesa/shader/prog_statevars.h |    2 ++
 src/mesa/vbo/vbo_context.h       |    4 ++--
 src/mesa/vbo/vbo_exec_api.c      |    1 +
 src/mesa/vbo/vbo_save_draw.c     |    1 +
 5 files changed, 7 insertions(+), 4 deletions(-)

New commits:
diff-tree 3f4826a358cab8b6d638fc8eb46aef668a7bcf46 (from 6ec7484ae8190fb8e61eae9a016b67db65011731)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Feb 22 09:10:38 2007 -0700

    XXX comments about shaders

diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 71fee8c..c30fd18 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -486,6 +486,7 @@ static void GLAPIENTRY vbo_exec_Begin( G
       if (ctx->NewState) {
 	 _mesa_update_state( ctx );
 
+         /* XXX also need to check if shader enabled, but invalid */
          if ((ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) ||
             (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled)) {
             _mesa_error(ctx, GL_INVALID_OPERATION,
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index a50d1cd..8be258d 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -203,6 +203,7 @@ void vbo_save_playback_vertex_list( GLco
       if (ctx->NewState)
 	 _mesa_update_state( ctx );
 
+      /* XXX also need to check if shader enabled, but invalid */
       if ((ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) ||
           (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled)) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
diff-tree 6ec7484ae8190fb8e61eae9a016b67db65011731 (from 96abc6bf72fe0ca6f2aceb87aa9324afe72d67ac)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Feb 22 09:10:24 2007 -0700

    use ctx->VertexProgram._Current instead of ctx->VertexProgram._Enabled

diff --git a/src/mesa/vbo/vbo_context.h b/src/mesa/vbo/vbo_context.h
index 0dc1019..013f81b 100644
--- a/src/mesa/vbo/vbo_context.h
+++ b/src/mesa/vbo/vbo_context.h
@@ -96,9 +96,9 @@ enum {
 
 static INLINE GLuint get_program_mode( GLcontext *ctx )
 {
-   if (!ctx->VertexProgram._Enabled)
+   if (!ctx->VertexProgram._Current)
       return VP_NONE;
-   else if (ctx->VertexProgram.Current->IsNVProgram)
+   else if (ctx->VertexProgram._Current->IsNVProgram)
       return VP_NV;
    else
       return VP_ARB;
diff-tree 96abc6bf72fe0ca6f2aceb87aa9324afe72d67ac (from 7b30053b264726156a018c822657270e745320ce)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Feb 22 09:08:53 2007 -0700

    merge fix: add STATE_FOG_PARAMS_OPTIMIZED, STATE_SPOT_DIR_NORMALIZED

diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h
index a1170d6..91713f3 100644
--- a/src/mesa/shader/prog_statevars.h
+++ b/src/mesa/shader/prog_statevars.h
@@ -108,6 +108,8 @@ typedef enum gl_state_index_ {
    STATE_NORMAL_SCALE,
    STATE_TEXRECT_SCALE,
    STATE_POSITION_NORMALIZED,   /* normalized light position */
+   STATE_FOG_PARAMS_OPTIMIZED,  /* for faster fog calc */
+   STATE_SPOT_DIR_NORMALIZED,   /* pre-normalized spot dir */
    STATE_INTERNAL_DRIVER	/* first available state index for drivers (must be last) */
 } gl_state_index;
 
diff-tree 7b30053b264726156a018c822657270e745320ce (from 29c471aafc6a3fef23d553e31a555d1782854a77)
Author: Brian <brian at yutani.localnet.net>
Date:   Thu Feb 22 09:08:36 2007 -0700

    fix negative indentation problem

diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 9560ffa..95b62fc 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -477,7 +477,7 @@ _mesa_print_instruction_opt(const struct
                             gl_prog_print_mode mode,
                             const struct gl_program *prog)
 {
-   GLuint i;
+   GLint i;
 
    if (inst->Opcode == OPCODE_ELSE ||
        inst->Opcode == OPCODE_ENDIF ||
@@ -485,7 +485,6 @@ _mesa_print_instruction_opt(const struct
        inst->Opcode == OPCODE_ENDSUB) {
       indent -= 3;
    }
-   assert(indent >= 0);
    for (i = 0; i < indent; i++) {
       _mesa_printf(" ");
    }


More information about the mesa-commit mailing list