summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-11 18:54:31 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-11 18:55:58 -0600
commit339e7ec6805e6de8794514c0a935081b5d36d38f (patch)
tree19a929546b9c5c6ffed958378a23c84eaa4c67a6 /src/mesa/state_tracker/st_context.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_context.h')
-rw-r--r--src/mesa/state_tracker/st_context.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 897a5109b7..e81aebba3d 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -74,14 +74,11 @@ struct st_context
* Other state is just parameter values.
*/
struct {
- const struct cso_alpha_test *alpha_test;
- const struct cso_blend *blend;
- void *sampler[PIPE_MAX_SAMPLERS];
- const struct cso_depth_stencil_alpha *depth_stencil;
- const struct cso_rasterizer *rasterizer;
- const struct cso_fragment_shader *fs;
- struct st_vertex_program *vs;
-
+ struct pipe_blend_state blend;
+ struct pipe_depth_stencil_alpha_state depth_stencil;
+ struct pipe_rasterizer_state rasterizer;
+ struct pipe_sampler_state samplers[PIPE_MAX_SAMPLERS];
+ struct pipe_sampler_state *sampler_list[PIPE_MAX_SAMPLERS];
struct pipe_blend_color blend_color;
struct pipe_clip_state clip;
struct pipe_constant_buffer constants[2];
@@ -151,6 +148,10 @@ struct st_context
/** For gen/render mipmap feature */
struct {
+ struct pipe_blend_state blend;
+ struct pipe_depth_stencil_alpha_state depthstencil;
+ struct pipe_rasterizer_state rasterizer;
+
void *blend_cso;
void *depthstencil_cso;
void *rasterizer_cso;
@@ -158,7 +159,7 @@ struct st_context
struct st_vertex_program *stvp;
} gen_mipmap;
- struct cso_cache *cache;
+ struct cso_context *cso_context;
};