diff options
Diffstat (limited to 'src/mesa')
-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; |