summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-07-24 09:58:19 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-24 09:58:19 -0600
commit47fafcf06f04c0db2d9908f30cfce6cd564d8973 (patch)
tree6a2903fd4fab410a18ac97b6a70faca3f2ebeeda /src/mesa/state_tracker
parent4477a01372c87b84e859c7522501d55a62f11b88 (diff)
use enabled/linked fragment shader in preference to a fragment program
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_fs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_fs.c b/src/mesa/state_tracker/st_atom_fs.c
index 6fa4f53c73..2397828e4c 100644
--- a/src/mesa/state_tracker/st_atom_fs.c
+++ b/src/mesa/state_tracker/st_atom_fs.c
@@ -50,7 +50,15 @@ static void compile_fs( struct st_context *st,
static void update_fs( struct st_context *st )
{
struct pipe_fs_state fs;
- struct st_fragment_program *fp = st_fragment_program(st->ctx->FragmentProgram._Current);
+ struct st_fragment_program *fp;
+
+ if (st->ctx->Shader.CurrentProgram &&
+ st->ctx->Shader.CurrentProgram->LinkStatus) {
+ fp = st_fragment_program(st->ctx->Shader.CurrentProgram->FragmentProgram);
+ }
+ else if (st->ctx->FragmentProgram._Current) {
+ fp = st_fragment_program(st->ctx->FragmentProgram._Current);
+ }
memset( &fs, 0, sizeof(fs) );
@@ -72,7 +80,7 @@ static void update_fs( struct st_context *st )
const struct st_tracked_state st_update_fs = {
.dirty = {
- .mesa = 0,
+ .mesa = _NEW_PROGRAM,
.st = ST_NEW_FRAGMENT_PROGRAM,
},
.update = update_fs