diff options
author | Marek Olšák <[email protected]> | 2012-04-24 22:53:05 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-30 01:18:48 +0200 |
commit | 0b7d48cbad86eaac21fce3793da41b46db8be3b4 (patch) | |
tree | 437f5cfeb3a77278d29e384b47dfaef9b96faa75 /src/gallium/drivers/radeonsi | |
parent | 01bf5569c44389c1127bbb9e873c8a234ac92ff7 (diff) |
gallium: add void *user_buffer to pipe_constant_buffer
This reduces CPU overhead when updating constants.
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_state_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_state_common.c b/src/gallium/drivers/radeonsi/r600_state_common.c index 05a201ce3bc..63c07420915 100644 --- a/src/gallium/drivers/radeonsi/r600_state_common.c +++ b/src/gallium/drivers/radeonsi/r600_state_common.c @@ -439,6 +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); |