summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-21 16:47:30 -0600
committerBrian Paul <[email protected]>2009-04-21 16:47:30 -0600
commitf4f39902fd0241162c06065e521151cd2572a34d (patch)
treecacde64ea67418d6b2ea73b778bd9e11e1ac5672 /src/mesa/state_tracker/st_atom.c
parent64e331eb529e66ef678804594c8a3266c97e645f (diff)
st: do away with dynamic state atom for const buffers
Just use the new _NEW_PROGRAM_CONSTANTS flag instead.
Diffstat (limited to 'src/mesa/state_tracker/st_atom.c')
-rw-r--r--src/mesa/state_tracker/st_atom.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index f79092291b0..ff7d388ddec 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -37,11 +37,8 @@
-/* This is used to initialize st->atoms[]. We could use this list
- * directly except for a single atom, st_update_constants, which has a
- * .dirty value which changes according to the parameters of the
- * current fragment and vertex programs, and so cannot be a static
- * value.
+/**
+ * This is used to initialize st->atoms[].
*/
static const struct st_tracked_state *atoms[] =
{
@@ -67,25 +64,9 @@ static const struct st_tracked_state *atoms[] =
void st_init_atoms( struct st_context *st )
{
- GLuint i;
-
st->atoms = _mesa_malloc(sizeof(atoms));
st->nr_atoms = sizeof(atoms)/sizeof(*atoms);
memcpy(st->atoms, atoms, sizeof(atoms));
-
- /* Patch in a pointer to the dynamic state atom:
- */
- for (i = 0; i < st->nr_atoms; i++) {
- if (st->atoms[i] == &st_update_vs_constants) {
- st->atoms[i] = &st->constants.tracked_state[PIPE_SHADER_VERTEX];
- st->atoms[i][0] = st_update_vs_constants;
- }
-
- if (st->atoms[i] == &st_update_fs_constants) {
- st->atoms[i] = &st->constants.tracked_state[PIPE_SHADER_FRAGMENT];
- st->atoms[i][0] = st_update_fs_constants;
- }
- }
}