#include "st_program.h"
#include "st_atom_shader.h"
-#include "tnl/tnl.h"
#include "pipe/tgsi/mesa/tgsi_mesa.h"
{
struct st_context *st = st_context(ctx);
- st->dirty.st |= ST_NEW_SHADER;
+ 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;
+ }
}
{
struct st_context *st = st_context(ctx);
- st->dirty.st |= ST_NEW_SHADER;
+ st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
+ st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
_mesa_use_program(ctx, program);
}
default:
return _mesa_new_program(ctx, target, id);
}
-
- st->dirty.st |= ST_NEW_SHADER;
}
}
stfp->param_state = stfp->Base.Base.Parameters->StateFlags;
+
+ if (st->fp == stfp)
+ st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
}
else if (target == GL_VERTEX_PROGRAM_ARB) {
struct st_vertex_program *stvp = (struct st_vertex_program *) prog;
stvp->param_state = stvp->Base.Base.Parameters->StateFlags;
- /* Also tell tnl about it:
- */
- _tnl_program_string(ctx, target, prog);
- }
+ if (st->vp == stvp)
+ st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
- st->dirty.st |= ST_NEW_SHADER;
+ }
}