diff options
author | Keith Whitwell <[email protected]> | 2009-03-13 16:22:35 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-03-13 16:24:22 +0000 |
commit | fa0f48504a32642d688d4b81f62eea54c693b23f (patch) | |
tree | 609b5def4528f347a2d531308eb95d3e08fcc14a /src/mesa/state_tracker | |
parent | b3be1651f4a45660b447881f7c61c03a1b24302a (diff) |
gallium: no need to keep a copy of shader tokens in state tracker
Any driver who needs a copy of the shader tokens must organize to
do so itself. This has been the case for a long time, but there
was still defensive code in the state tracker, which is now removed.
Any bugs resulting from this need to be fixed in the offending driver...
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_shader.c | 7 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 15 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 3 |
4 files changed, 4 insertions, 25 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index 486582fce89..fc1ff5be04a 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -307,14 +307,9 @@ st_free_translated_vertex_programs(struct st_context *st, static void * get_passthrough_fs(struct st_context *st) { - struct pipe_shader_state shader; - if (!st->passthrough_fs) { st->passthrough_fs = - util_make_fragment_passthrough_shader(st->pipe, &shader); -#if 0 /* We actually need to keep the tokens around at this time */ - util_free_shader(&shader); -#endif + util_make_fragment_passthrough_shader(st->pipe); } return st->passthrough_fs; diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 3f503f12532..f9f1780ba88 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -740,8 +740,7 @@ st_Bitmap(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const uint semantic_indexes[] = { 0, 0, 0 }; st->bitmap.vs = util_make_vertex_passthrough_shader(st->pipe, 3, semantic_names, - semantic_indexes, - &st->bitmap.vert_shader); + semantic_indexes); } if (UseBitmapCache && accum_bitmap(st, x, y, width, height, unpack, bitmap)) @@ -830,7 +829,6 @@ st_destroy_bitmap(struct st_context *st) cso_delete_vertex_shader(st->cso_context, st->bitmap.vs); st->bitmap.vs = NULL; } - util_free_shader(&st->bitmap.vert_shader); if (st->bitmap.vbuf) { pipe_buffer_reference(&st->bitmap.vbuf, NULL); diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 7d4948a64ea..8206733f766 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -77,7 +77,7 @@ st_init_clear(struct st_context *st) /* fragment shader state: color pass-through program */ st->clear.fs = - util_make_fragment_passthrough_shader(pipe, &st->clear.frag_shader); + util_make_fragment_passthrough_shader(pipe); /* vertex shader state: color/position pass-through */ { @@ -86,8 +86,7 @@ st_init_clear(struct st_context *st) const uint semantic_indexes[] = { 0, 0 }; st->clear.vs = util_make_vertex_passthrough_shader(pipe, 2, semantic_names, - semantic_indexes, - &st->clear.vert_shader); + semantic_indexes); } } @@ -95,16 +94,6 @@ st_init_clear(struct st_context *st) void st_destroy_clear(struct st_context *st) { - if (st->clear.vert_shader.tokens) { - util_free_shader(&st->clear.vert_shader); - st->clear.vert_shader.tokens = NULL; - } - - if (st->clear.frag_shader.tokens) { - util_free_shader(&st->clear.frag_shader); - st->clear.frag_shader.tokens = NULL; - } - if (st->clear.fs) { cso_delete_fragment_shader(st->cso_context, st->clear.fs); st->clear.fs = NULL; diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 3547925ad7f..d7518ab6897 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -149,7 +149,6 @@ struct st_context struct { struct pipe_rasterizer_state rasterizer; struct pipe_sampler_state sampler; - struct pipe_shader_state vert_shader; enum pipe_format tex_format; void *vs; float vertices[4][3][4]; /**< vertex pos + color + texcoord */ @@ -166,8 +165,6 @@ struct st_context /** for glClear */ struct { - struct pipe_shader_state vert_shader; - struct pipe_shader_state frag_shader; struct pipe_rasterizer_state raster; struct pipe_viewport_state viewport; void *vs; |