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...
This commit is contained in:
Keith Whitwell
2009-03-13 16:22:35 +00:00
parent b3be1651f4
commit fa0f48504a
11 changed files with 61 additions and 107 deletions

View File

@@ -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;