summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_program.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-09-19 18:53:36 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-09-19 18:53:59 -0600
commit37cf13ed9a429c755f121daa1776b1b30a985ab3 (patch)
tree8ae423c054011d6826024b173e1de892c8bed78e /src/mesa/state_tracker/st_program.h
parent83a674a7af4e58f677a56aae2111d2cbdbf1e21d (diff)
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.
Diffstat (limited to 'src/mesa/state_tracker/st_program.h')
-rw-r--r--src/mesa/state_tracker/st_program.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index 68ceba4d78..4945141d15 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