diff options
author | Roland Scheidegger <[email protected]> | 2010-01-15 18:09:45 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-01-15 18:09:45 +0100 |
commit | 5e5d0ad08167c178fcda005862e3dbead3e8c482 (patch) | |
tree | f08d0cf2725fede62ada26e8815d6d9eeebdf337 /src/gallium/drivers/nv10 | |
parent | 1c4ad778126788cebcb54342837042bfe432d504 (diff) | |
parent | 70c8d2a29724d018bacc4a68ddc61db08faea00d (diff) |
Merge branch 'gallium-noconstbuf'
Conflicts:
src/gallium/drivers/softpipe/sp_draw_arrays.c
src/mesa/state_tracker/st_draw_feedback.c
Diffstat (limited to 'src/gallium/drivers/nv10')
-rw-r--r-- | src/gallium/drivers/nv10/nv10_state.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/nv10/nv10_state.c b/src/gallium/drivers/nv10/nv10_state.c index ffc6be3c401..ad7def53b12 100644 --- a/src/gallium/drivers/nv10/nv10_state.c +++ b/src/gallium/drivers/nv10/nv10_state.c @@ -458,7 +458,7 @@ nv10_set_clip_state(struct pipe_context *pipe, static void nv10_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, - const struct pipe_constant_buffer *buf ) + struct pipe_buffer *buf ) { struct nv10_context *nv10 = nv10_context(pipe); struct pipe_screen *pscreen = pipe->screen; @@ -468,13 +468,13 @@ nv10_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, if (buf) { void *mapped; - if (buf->buffer && buf->buffer->size && - (mapped = pipe_buffer_map(pscreen, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ))) + if (buf->size && + (mapped = pipe_buffer_map(pscreen, buf, PIPE_BUFFER_USAGE_CPU_READ))) { - memcpy(nv10->constbuf[shader], mapped, buf->buffer->size); + memcpy(nv10->constbuf[shader], mapped, buf->size); nv10->constbuf_nr[shader] = - buf->buffer->size / (4 * sizeof(float)); - pipe_buffer_unmap(pscreen, buf->buffer); + buf->size / (4 * sizeof(float)); + pipe_buffer_unmap(pscreen, buf); } } } |