diff options
author | Marek Olšák <[email protected]> | 2012-04-24 19:52:26 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-30 01:09:57 +0200 |
commit | 507337864fa80caf9f26602324d2c28dd0a75d61 (patch) | |
tree | 94ec3c69d93f5dc70f0f042c1dbc11fe01a8550c /src/gallium/drivers/rbug | |
parent | 1b749dc34f8d83cf3dfa863279b1fe2b356d34b2 (diff) |
gallium: change set_constant_buffer to be UBO-friendly
Diffstat (limited to 'src/gallium/drivers/rbug')
-rw-r--r-- | src/gallium/drivers/rbug/rbug_context.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c index 46518cd6977..799b3a30c63 100644 --- a/src/gallium/drivers/rbug/rbug_context.c +++ b/src/gallium/drivers/rbug/rbug_context.c @@ -614,24 +614,23 @@ static void rbug_set_constant_buffer(struct pipe_context *_pipe, uint shader, uint index, - struct pipe_resource *_resource) + struct pipe_constant_buffer *_cb) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; - struct pipe_resource *unwrapped_resource; - struct pipe_resource *resource = NULL; + struct pipe_constant_buffer cb; /* XXX hmm? unwrap the input state */ - if (_resource) { - unwrapped_resource = rbug_resource_unwrap(_resource); - resource = unwrapped_resource; + if (_cb) { + cb = *_cb; + cb.buffer = rbug_resource_unwrap(_cb->buffer); } pipe_mutex_lock(rb_pipe->call_mutex); pipe->set_constant_buffer(pipe, shader, index, - resource); + _cb ? &cb : NULL); pipe_mutex_unlock(rb_pipe->call_mutex); } |