summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.h
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-03-11 18:54:31 -0600
committerBrian <[email protected]>2008-03-11 18:55:58 -0600
commit339e7ec6805e6de8794514c0a935081b5d36d38f (patch)
tree19a929546b9c5c6ffed958378a23c84eaa4c67a6 /src/mesa/state_tracker/st_program.h
parent21ff00306131cd5598f95285badaaabc98021e11 (diff)
gallium: rework CSO-related code in state tracker
Use the code in cso_context.c rather than st_cache.c. Basically, binding of state objects now goes through the CSO module. But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're not cached by the CSO module at this time. Also, update softpipe driver to handle NULL state objects in various places. This happens during context destruction. May need to update other drivers...
Diffstat (limited to 'src/mesa/state_tracker/st_program.h')
-rw-r--r--src/mesa/state_tracker/st_program.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index 31558af6ced..78786dcbb61 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -60,11 +60,8 @@ struct st_fragment_program
/** map FP input back to VP output */
GLuint input_map[PIPE_MAX_SHADER_INPUTS];
- /** The program in TGSI format */
- struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];
-
- /** Pointer to the corresponding cached shader */
- const struct cso_fragment_shader *cso;
+ struct pipe_shader_state state;
+ struct pipe_shader_state *driver_shader;
GLuint param_state;
@@ -88,11 +85,8 @@ struct st_vertex_program
/** maps a TGSI input index back to a Mesa VERT_ATTRIB_x */
GLuint index_to_input[PIPE_MAX_SHADER_INPUTS];
- /** The program in TGSI format */
- struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];
-
- /** Pointer to the corresponding cached shader */
- const struct cso_vertex_shader *cso;
+ struct pipe_shader_state state;
+ struct pipe_shader_state *driver_shader;
/** For using our private draw module (glRasterPos) */
struct draw_vertex_shader *draw_shader;
@@ -122,16 +116,12 @@ st_vertex_program( struct gl_vertex_program *vp )
extern const struct cso_fragment_shader *
st_translate_fragment_program(struct st_context *st,
struct st_fragment_program *fp,
- const GLuint inputMapping[],
- struct tgsi_token *tokens,
- GLuint maxTokens);
+ const GLuint inputMapping[]);
extern void
st_translate_vertex_program(struct st_context *st,
struct st_vertex_program *vp,
- const GLuint vert_output_to_slot[],
- struct tgsi_token *tokens,
- GLuint maxTokens);
+ const GLuint vert_output_to_slot[]);
#endif