From 4824c342c864e870251a7d343c95e51274e50d23 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 19 Jul 2007 20:24:55 +0100 Subject: Trigger tgsi compilation for fragment programs. Not sure the generated program looks correct though... --- src/mesa/state_tracker/st_program.h | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker/st_program.h') diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index a47059d7a6..b28887946d 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -34,6 +34,12 @@ #ifndef ST_PROGRAM_H #define ST_PROGRAM_H +#include "mtypes.h" +#include "pipe/tgsi/core/tgsi_token.h" + +#define ST_FP_MAX_TOKENS 1024 + + struct st_fragment_program { struct gl_fragment_program Base; @@ -43,6 +49,11 @@ struct st_fragment_program * ProgramStringNotify changes. */ + + struct tgsi_token tokens[ST_FP_MAX_TOKENS]; + GLboolean dirty; + + #if 0 GLfloat (*cbuffer)[4]; GLuint nr_constants; @@ -56,13 +67,38 @@ struct st_fragment_program const GLfloat *values; /* Pointer to tracked values */ } *param; GLuint nr_params; +#endif GLuint param_state; -#endif }; +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. + */ + + GLboolean dirty; + GLuint param_state; +}; + void st_init_cb_program( struct st_context *st ); void st_destroy_cb_program( struct st_context *st ); +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 -- cgit v1.2.3