Minor tweaks to help out at a driver level.
[mesa.git] / src / mesa / main / program.h
index 2445fcc9a44d849e6bd29843e0589a9c105c342f..4dbc5cffd7cc1928c4c10f1e62533b60cdcc1fa0 100644 (file)
 
 
 /* for GL_ARB_v_p and GL_ARB_f_p SWZ instruction */
-#define SWIZZLE_ZERO 100
-#define SWIZZLE_ONE  101
+#define SWIZZLE_X    0
+#define SWIZZLE_Y    1
+#define SWIZZLE_Z    2
+#define SWIZZLE_W    3
+#define SWIZZLE_ZERO 4         /* keep these values together: KW */
+#define SWIZZLE_ONE  5         /* keep these values together: KW */
 
 
 /*
@@ -101,6 +105,7 @@ enum state_index {
    STATE_SPECULAR,
    STATE_EMISSION,
    STATE_SHININESS,
+   STATE_HALF, 
 
    STATE_POSITION,
    STATE_ATTENUATION,
@@ -113,7 +118,17 @@ enum state_index {
    STATE_TEXGEN_OBJECT_S,
    STATE_TEXGEN_OBJECT_T,
    STATE_TEXGEN_OBJECT_R,
-   STATE_TEXGEN_OBJECT_Q
+   STATE_TEXGEN_OBJECT_Q,
+
+   STATE_TEXENV_COLOR,
+       
+   STATE_DEPTH_RANGE,
+
+   STATE_VERTEX_PROGRAM,
+   STATE_FRAGMENT_PROGRAM,
+
+   STATE_ENV,
+   STATE_LOCAL
 };
 
 
@@ -137,7 +152,7 @@ struct program_parameter
 {
    const char *Name;                   /* Null-terminated */
    enum parameter_type Type;
-   enum state_index StateIndexes[5];   /* Global state reference */
+   enum state_index StateIndexes[6];   /* Global state reference */
    GLfloat Values[4];
 };
 
@@ -176,7 +191,7 @@ _mesa_add_unnamed_constant(struct program_parameter_list *paramList,
 
 extern GLint
 _mesa_add_state_reference(struct program_parameter_list *paramList,
-                          const char *stateString);
+                          GLint *stateTokens);
 
 extern GLfloat *
 _mesa_lookup_parameter_value(struct program_parameter_list *paramList,
@@ -195,17 +210,31 @@ _mesa_load_state_parameters(GLcontext *ctx,
  * API functions
  */
 
-extern void
+extern void GLAPIENTRY
 _mesa_BindProgram(GLenum target, GLuint id);
 
-extern void
+extern void GLAPIENTRY
 _mesa_DeletePrograms(GLsizei n, const GLuint *ids);
 
-extern void
+extern void GLAPIENTRY
 _mesa_GenPrograms(GLsizei n, GLuint *ids);
 
-extern GLboolean
+extern GLboolean GLAPIENTRY
 _mesa_IsProgram(GLuint id);
 
 
+
+/*
+ * GL_MESA_program_debug
+ */
+
+extern void
+_mesa_ProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback,
+                          GLvoid *data);
+
+extern void
+_mesa_GetProgramRegisterfvMESA(GLenum target, GLsizei len,
+                               const GLubyte *registerName, GLfloat *v);
+
+
 #endif /* PROGRAM_H */