diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-09-25 14:46:49 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-09-25 14:46:49 -0600 |
commit | 07f31a29b41be572c48fc1b440eaeb6a6b010cc8 (patch) | |
tree | 166f0a6818354257a8ab8825388e4f72cab1ce14 /src | |
parent | 1201eb852966a64742645a4cd3a2879bed81e29d (diff) |
some clean-up of ST_NEW_ shader flags
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_atom_shader.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_program.c | 24 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 2 |
3 files changed, 6 insertions, 22 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index f3bb9effde..383184e575 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -416,7 +416,7 @@ const struct st_tracked_state st_update_shader = { .name = "st_update_shader", .dirty = { .mesa = 0, - .st = ST_NEW_LINKAGE + .st = ST_NEW_SHADER }, .update = update_linkage }; diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index aee316df6f..f57d22652f 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -56,15 +56,7 @@ static void st_bind_program( GLcontext *ctx, { struct st_context *st = st_context(ctx); - switch (target) { - case GL_VERTEX_PROGRAM_ARB: - st->dirty.st |= ST_NEW_VERTEX_PROGRAM; - break; - case GL_FRAGMENT_PROGRAM_ARB: - st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM; - break; - } - st->dirty.st |= ST_NEW_LINKAGE; + st->dirty.st |= ST_NEW_SHADER; } @@ -77,9 +69,7 @@ static void st_use_program( GLcontext *ctx, { struct st_context *st = st_context(ctx); - st->dirty.st |= ST_NEW_VERTEX_PROGRAM; - st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM; - st->dirty.st |= ST_NEW_LINKAGE; + st->dirty.st |= ST_NEW_SHADER; } @@ -126,7 +116,7 @@ static struct gl_program *st_new_program( GLcontext *ctx, return _mesa_new_program(ctx, target, id); } - st->dirty.st |= ST_NEW_LINKAGE; + st->dirty.st |= ST_NEW_SHADER; } @@ -180,9 +170,6 @@ static void st_program_string_notify( GLcontext *ctx, if (target == GL_FRAGMENT_PROGRAM_ARB) { struct st_fragment_program *stfp = (struct st_fragment_program *) prog; - if (prog == &ctx->FragmentProgram._Current->Base) - st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM; - stfp->serialNo++; stfp->param_state = stfp->Base.Base.Parameters->StateFlags; @@ -190,9 +177,6 @@ static void st_program_string_notify( GLcontext *ctx, else if (target == GL_VERTEX_PROGRAM_ARB) { struct st_vertex_program *stvp = (struct st_vertex_program *) prog; - if (prog == &ctx->VertexProgram._Current->Base) - st->dirty.st |= ST_NEW_VERTEX_PROGRAM; - stvp->serialNo++; stvp->param_state = stvp->Base.Base.Parameters->StateFlags; @@ -202,7 +186,7 @@ static void st_program_string_notify( GLcontext *ctx, _tnl_program_string(ctx, target, prog); } - st->dirty.st |= ST_NEW_LINKAGE; + st->dirty.st |= ST_NEW_SHADER; } diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 24f0ff9aaf..da4fd0d4e4 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -45,7 +45,7 @@ struct cso_blend; #define ST_NEW_MESA 0x1 /* Mesa state has changed */ #define ST_NEW_FRAGMENT_PROGRAM 0x2 #define ST_NEW_VERTEX_PROGRAM 0x4 -#define ST_NEW_LINKAGE 0x8 +#define ST_NEW_SHADER 0x8 struct st_state_flags { |