diff options
author | Brian <[email protected]> | 2008-03-21 15:54:27 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-21 15:54:27 -0600 |
commit | fb1f4e207d9becca4a83d4934ff6aebf8270e51a (patch) | |
tree | 262f8d3bca1f794d7537e50f4d79586384053ce1 /src/mesa/state_tracker/st_atom_constbuf.c | |
parent | a39091bc5b68e4d4f5302f1d3f1a138798f54b77 (diff) |
gallium: fix const buffer update bug
If only glUniform is called between two renderings, the const buffers weren't
getting updated. Need to set the _NEW_PROGRAM flag in st_upload_constants()
as that's the dirty flag set by glUniform.
Fixes glean tapi2 test.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_constbuf.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_constbuf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 21416da2e01..cd7372902b8 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -66,7 +66,8 @@ void st_upload_constants( struct st_context *st, /* Update our own dependency flags. This works because this * function will also be called whenever the program changes. */ - st->constants.tracked_state[id].dirty.mesa = params->StateFlags; + st->constants.tracked_state[id].dirty.mesa = + (params->StateFlags | _NEW_PROGRAM); _mesa_load_state_parameters(st->ctx, params); @@ -115,7 +116,7 @@ static void update_vs_constants(struct st_context *st ) const struct st_tracked_state st_update_vs_constants = { .name = "st_update_vs_constants", .dirty = { - .mesa = 0, + .mesa = 0, /* set dynamically above */ .st = ST_NEW_VERTEX_PROGRAM, }, .update = update_vs_constants @@ -134,7 +135,7 @@ static void update_fs_constants(struct st_context *st ) const struct st_tracked_state st_update_fs_constants = { .name = "st_update_fs_constants", .dirty = { - .mesa = 0, + .mesa = 0, /* set dynamically above */ .st = ST_NEW_FRAGMENT_PROGRAM, }, .update = update_fs_constants |