aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_constbuf.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-04-22 21:41:57 +1000
committerDave Airlie <[email protected]>2009-04-22 21:41:57 +1000
commit466c78c93538f2853449124c06274d538830cd5a (patch)
treea6bd88060ba328d8bed1ff2ea1a37ee741a90a17 /src/mesa/state_tracker/st_atom_constbuf.c
parent65fe0c86ffcff99f9f09606d462bf3731ea0c308 (diff)
parentf057f6543da469f231d551cb5728d98df8add4fa (diff)
Merge remote branch 'origin/master' into radeon-rewrite
Diffstat (limited to 'src/mesa/state_tracker/st_atom_constbuf.c')
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index fd81ac36d2c..77ecd0719e6 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -42,7 +42,7 @@
#include "st_atom.h"
#include "st_atom_constbuf.h"
#include "st_program.h"
-
+#include "st_inlines.h"
/**
* Pass the given program parameters to the graphics pipe as a
@@ -62,12 +62,6 @@ void st_upload_constants( struct st_context *st,
if (params && params->NumParameters) {
const uint paramBytes = params->NumParameters * sizeof(GLfloat) * 4;
- /* 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 | _NEW_PROGRAM);
-
_mesa_load_state_parameters(st->ctx, params);
/* We always need to get a new buffer, to keep the drivers simple and
@@ -86,9 +80,9 @@ void st_upload_constants( struct st_context *st,
/* load Mesa constants into the constant buffer */
if (cbuf->buffer)
- pipe_buffer_write(pipe->screen, cbuf->buffer,
- 0, paramBytes,
- params->ParameterValues);
+ st_no_flush_pipe_buffer_write(st, cbuf->buffer,
+ 0, paramBytes,
+ params->ParameterValues);
st->pipe->set_constant_buffer(st->pipe, id, 0, cbuf);
}
@@ -111,7 +105,7 @@ static void update_vs_constants(struct st_context *st )
const struct st_tracked_state st_update_vs_constants = {
"st_update_vs_constants", /* name */
{ /* dirty */
- 0, /* set dynamically above */ /* mesa */
+ _NEW_PROGRAM_CONSTANTS,
ST_NEW_VERTEX_PROGRAM, /* st */
},
update_vs_constants /* update */
@@ -130,7 +124,7 @@ static void update_fs_constants(struct st_context *st )
const struct st_tracked_state st_update_fs_constants = {
"st_update_fs_constants", /* name */
{ /* dirty */
- 0, /* set dynamically above */ /* mesa */
+ (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS), /* mesa */
ST_NEW_FRAGMENT_PROGRAM, /* st */
},
update_fs_constants /* update */