diff options
author | Corbin Simpson <[email protected]> | 2010-03-29 15:10:18 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2010-03-29 21:33:19 -0700 |
commit | 587c5ef01fad962bcfb087232d0925a8eec86953 (patch) | |
tree | 66ba5ff30e20a9b3ce871e5a81008edfd866b9e4 /src/gallium/drivers/r300/r300_state.c | |
parent | c1a392ac4c6a7da4026653de556c2c7698f86860 (diff) |
r300g: Bind constantbuf to Draw immediately, don't wait for render.
Doesn't hurt, and reduces code duplication.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index b7b5e1ef03b..ace71d657ef 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1365,10 +1365,14 @@ static void r300_set_constant_buffer(struct pipe_context *pipe, if (r300screen->caps->has_tcl) { r300->dirty_state |= R300_NEW_VERTEX_SHADER_CONSTANTS; r300->pvs_flush.dirty = TRUE; + } else if (r300->draw) { + draw_set_mapped_constant_buffer(r300->draw, PIPE_SHADER_VERTEX, + 0, r300->shader_constants[PIPE_SHADER_VERTEX].constants, + buf->size); } - } - else if (shader == PIPE_SHADER_FRAGMENT) + } else if (shader == PIPE_SHADER_FRAGMENT) { r300->dirty_state |= R300_NEW_FRAGMENT_SHADER_CONSTANTS; + } } void r300_init_state_functions(struct r300_context* r300) |