#ifndef ST_PROGRAM_H
#define ST_PROGRAM_H
+#include "mtypes.h"
+#include "pipe/tgsi/exec/tgsi_token.h"
+#include "x86/rtasm/x86sse.h"
+
+#define ST_FP_MAX_TOKENS 1024
+
+
struct st_fragment_program
{
struct gl_fragment_program Base;
* ProgramStringNotify changes.
*/
-#if 0
- GLfloat (*cbuffer)[4];
- GLuint nr_constants;
-
- /* Translate all the parameters, etc, into a constant buffer which
- * we update on state changes.
- */
- struct
- {
- GLuint reg; /* Constant idx */
- const GLfloat *values; /* Pointer to tracked values */
- } *param;
- GLuint nr_params;
+ struct tgsi_token tokens[ST_FP_MAX_TOKENS];
+ GLboolean dirty;
+
+ struct pipe_shader_state fs;
GLuint param_state;
+};
+
+
+struct st_vertex_program
+{
+ struct gl_vertex_program Base;
+ GLboolean error; /* If program is malformed for any reason. */
+
+ GLuint id; /* String id, for tracking
+ * ProgramStringNotify changes.
+ */
+
+ struct tgsi_token tokens[ST_FP_MAX_TOKENS];
+ GLboolean dirty;
+
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+ struct x86_function sse2_program;
#endif
+
+ struct pipe_shader_state vs;
+ GLuint param_state;
};
-void st_init_cb_program( struct st_context *st );
-void st_destroy_cb_program( struct st_context *st );
+extern void st_init_program_functions(struct dd_function_table *functions);
+
+
+static inline struct st_fragment_program *
+st_fragment_program( struct gl_fragment_program *fp )
+{
+ return (struct st_fragment_program *)fp;
+}
+
+static inline struct st_vertex_program *
+st_vertex_program( struct gl_vertex_program *vp )
+{
+ return (struct st_vertex_program *)vp;
+}
#endif