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.
This commit is contained in:
Brian
2008-03-21 15:54:27 -06:00
parent a39091bc5b
commit fb1f4e207d

View File

@@ -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