From 37cf13ed9a429c755f121daa1776b1b30a985ab3 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 19 Sep 2007 18:53:36 -0600 Subject: Checkpoint: replacement of TGSI_ATTRIB_x tokens with input/output semantics. TGSI_ATTRIB_x tokens still present and used in a few places. Expanded set of TGSI_SEMANTIC_x tokens for describing the meaning of inputs/outputs. These tokens are in a crude state ATM. Lots of #if 0 / disabled code to be removed yet, etc... Softpipe and i915 drivers should be in working condition but not heavily tested. --- src/mesa/state_tracker/st_program.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (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 68ceba4d787..4945141d154 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -45,16 +45,15 @@ struct st_fragment_program { struct gl_fragment_program Base; GLboolean error; /* If program is malformed for any reason. */ - - GLuint id; /* String id, for tracking - * ProgramStringNotify changes. - */ + GLuint id; /**< String id, for tracking ProgramStringNotify changes. */ struct tgsi_token tokens[ST_FP_MAX_TOKENS]; GLboolean dirty; - const struct pipe_shader_state *fsx; + /** Pointer to the corresponding cached shader */ + const struct pipe_shader_state *fs; + GLuint param_state; }; @@ -63,16 +62,17 @@ struct st_vertex_program { struct gl_vertex_program Base; /**< The Mesa vertex program */ GLboolean error; /**< Set if program is malformed for any reason. */ - - GLuint id; /**< String id, for tracking ProgramStringNotify changes. */ + GLuint id; /**< String id, for tracking ProgramStringNotify changes. */ /** maps a Mesa VERT_ATTRIB_x to a packed TGSI input index */ GLuint input_to_index[MAX_VERTEX_PROGRAM_ATTRIBS]; /** maps a TGSI input index back to a Mesa VERT_ATTRIB_x */ GLuint index_to_input[MAX_VERTEX_PROGRAM_ATTRIBS]; +#if 0 GLuint output_to_index[MAX_VERTEX_PROGRAM_ATTRIBS]; GLuint index_to_output[MAX_VERTEX_PROGRAM_ATTRIBS]; +#endif /** The program in TGSI format */ struct tgsi_token tokens[ST_FP_MAX_TOKENS]; @@ -82,7 +82,9 @@ struct st_vertex_program struct x86_function sse2_program; #endif + /** Pointer to the corresponding cached shader */ const struct pipe_shader_state *vs; + GLuint param_state; }; @@ -102,4 +104,15 @@ st_vertex_program( struct gl_vertex_program *vp ) return (struct st_vertex_program *)vp; } + +extern struct pipe_shader_state * +st_translate_fragment_shader(struct st_context *st, + struct st_fragment_program *fp); + + +extern struct pipe_shader_state * +st_translate_vertex_shader(struct st_context *st, + struct st_vertex_program *vp); + + #endif -- cgit v1.2.3