New _mesa_exec_vertex_state_program() function. Start of some re-org.
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 29 Oct 2006 18:33:14 +0000 (18:33 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 29 Oct 2006 18:33:14 +0000 (18:33 +0000)
src/mesa/shader/nvprogram.c
src/mesa/shader/nvvertexec.c
src/mesa/shader/nvvertexec.h

index 47d2b61..0e9a01d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.1
+ * Version:  6.5.2
  *
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
@@ -77,10 +77,7 @@ _mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
       return;
    }
    
-   _mesa_init_vp_per_vertex_registers(ctx);
-   _mesa_init_vp_per_primitive_registers(ctx);
-   COPY_4V(ctx->VertexProgram.Machine.Inputs[VERT_ATTRIB_POS], params);
-   _mesa_exec_vertex_program(ctx, vprog);
+   _mesa_exec_vertex_state_program(ctx, vprog, params);
 }
 
 
index 1985593..a4c5728 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5
+ * Version:  6.5.2
  *
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
@@ -805,6 +805,22 @@ _mesa_exec_vertex_program(GLcontext *ctx, const struct gl_vertex_program *progra
 }
 
 
+/**
+ * Execute a vertex state program.
+ * \sa _mesa_ExecuteProgramNV
+ */
+void
+_mesa_exec_vertex_state_program(GLcontext *ctx,
+                                struct gl_vertex_program *vprog,
+                                const GLfloat *params)
+{
+   _mesa_init_vp_per_vertex_registers(ctx);
+   _mesa_init_vp_per_primitive_registers(ctx);
+   COPY_4V(ctx->VertexProgram.Machine.Inputs[VERT_ATTRIB_POS], params);
+   _mesa_exec_vertex_program(ctx, vprog);
+}
+
+
 
 /**
 Thoughts on vertex program optimization:
index e0fd46a..e7c5be0 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.1
+ * Version:  6.5.2
  *
- * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -35,7 +35,13 @@ extern void
 _mesa_init_vp_per_primitive_registers(GLcontext *ctx);
 
 extern void
-_mesa_exec_vertex_program(GLcontext *ctx, const struct gl_vertex_program *program);
+_mesa_exec_vertex_program(GLcontext *ctx,
+                          const struct gl_vertex_program *program);
+
+extern void
+_mesa_exec_vertex_state_program(GLcontext *ctx,
+                                struct gl_vertex_program *vprog,
+                                const GLfloat *params);
 
 extern void
 _mesa_dump_vp_state( const struct gl_vertex_program_state *state );