Merge branch 'dri2'
[mesa.git] / src / mesa / shader / prog_execute.h
index 0e737657e345e18fa79ab2b1ef1c392cd044d1d9..be29eceedaa442e2d965836eb736241e45a93fd7 100644 (file)
@@ -35,6 +35,10 @@ typedef void (*FetchTexelDerivFunc)(GLcontext *ctx, const GLfloat texcoord[4],
                                     GLuint unit, GLfloat color[4]);
 
 
+/** The larger of VERT_RESULT_MAX, FRAG_RESULT_MAX */
+#define MAX_PROGRAM_OUTPUTS VERT_RESULT_MAX
+
+
 /**
  * Virtual machine state used during execution of vertex/fragment programs.
  */
@@ -44,16 +48,19 @@ struct gl_program_machine
 
    /** Fragment Input attributes */
    GLfloat (*Attribs)[MAX_WIDTH][4];
+   GLfloat (*DerivX)[4];
+   GLfloat (*DerivY)[4];
+   GLuint NumDeriv; /**< Max index into DerivX/Y arrays */
    GLuint CurElement; /**< Index into Attribs arrays */
 
    /** Vertex Input attribs */
    GLfloat VertAttribs[VERT_ATTRIB_MAX][4];
 
    GLfloat Temporaries[MAX_PROGRAM_TEMPS][4];
-   GLfloat Outputs[FRAG_RESULT_MAX][4];
+   GLfloat Outputs[MAX_PROGRAM_OUTPUTS][4];
+   GLfloat (*EnvParams)[4]; /**< Vertex or Fragment env parameters */
    GLuint CondCodes[4];  /**< COND_* value for x/y/z/w */
-
-   GLint AddressReg[MAX_VERTEX_PROGRAM_ADDRESS_REGS][4];
+   GLint AddressReg[MAX_PROGRAM_ADDRESS_REGS][4];
 
    GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */
    GLuint StackDepth; /**< Index/ptr to top of CallStack[] */
@@ -70,8 +77,8 @@ _mesa_get_program_register(GLcontext *ctx, enum register_file file,
 
 extern GLboolean
 _mesa_execute_program(GLcontext *ctx,
-                      const struct gl_program *program, GLuint maxInst,
-                      struct gl_program_machine *machine, GLuint element);
+                      const struct gl_program *program,
+                      struct gl_program_machine *machine);
 
 
 #endif /* PROG_EXECUTE_H */