summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/r600_state_common.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-26 13:39:19 +0200
committerMarek Olšák <[email protected]>2012-04-30 01:18:48 +0200
commit65d451d9fa1192c386301ca0b84b6c5cd369f92d (patch)
tree43b4111d1dd22f2e074c0bf4e87f969b949b2d03 /src/gallium/drivers/radeonsi/r600_state_common.c
parent0b7d48cbad86eaac21fce3793da41b46db8be3b4 (diff)
radeonsi: don't create temporary user buffer for r600_upload_const_buffer
Diffstat (limited to 'src/gallium/drivers/radeonsi/r600_state_common.c')
-rw-r--r--src/gallium/drivers/radeonsi/r600_state_common.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_state_common.c b/src/gallium/drivers/radeonsi/r600_state_common.c
index 63c07420915..53a34ef519c 100644
--- a/src/gallium/drivers/radeonsi/r600_state_common.c
+++ b/src/gallium/drivers/radeonsi/r600_state_common.c
@@ -439,15 +439,12 @@ void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
return;
}
- if (cb->user_buffer) {
- rbuffer = pipe_user_buffer_create(ctx->screen, cb->user_buffer,
- cb->buffer_size,
- PIPE_BIND_CONSTANT_BUFFER);
- }
-
r600_inval_shader_cache(rctx);
- r600_upload_const_buffer(rctx, &rbuffer, &offset);
+ if (cb->user_buffer)
+ r600_upload_const_buffer(rctx, &rbuffer, cb->user_buffer, cb->buffer_size, &offset);
+ else
+ offset = 0;
va_offset = r600_resource_va(ctx->screen, (void*)rbuffer);
va_offset += offset;
//va_offset >>= 8;