summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915simple
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2009-01-26 15:22:53 -0500
committerZack Rusin <[email protected]>2009-01-27 12:20:26 -0500
commit4f5308bdcb9e62f678975a77783a48096f6dfdc6 (patch)
tree3895687d86bdff430155b850b663d252f867dfdc /src/gallium/drivers/i915simple
parentd6888e811d24eaa7e8d9093be606394f00435c05 (diff)
gallium: remove redundant size from the constant buffer
reuse the size of the actual buffer
Diffstat (limited to 'src/gallium/drivers/i915simple')
-rw-r--r--src/gallium/drivers/i915simple/i915_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c
index f46e46eb22b..19f194c027d 100644
--- a/src/gallium/drivers/i915simple/i915_state.c
+++ b/src/gallium/drivers/i915simple/i915_state.c
@@ -535,13 +535,13 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
*/
if (buf) {
void *mapped;
- if (buf->size &&
+ if (buf->buffer && buf->buffer->size &&
(mapped = ws->buffer_map(ws, buf->buffer,
PIPE_BUFFER_USAGE_CPU_READ))) {
- memcpy(i915->current.constants[shader], mapped, buf->size);
+ memcpy(i915->current.constants[shader], mapped, buf->buffer->size);
ws->buffer_unmap(ws, buf->buffer);
i915->current.num_user_constants[shader]
- = buf->size / (4 * sizeof(float));
+ = buf->buffer->size / (4 * sizeof(float));
}
else {
i915->current.num_user_constants[shader] = 0;