From 507337864fa80caf9f26602324d2c28dd0a75d61 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 24 Apr 2012 19:52:26 +0200 Subject: gallium: change set_constant_buffer to be UBO-friendly --- src/gallium/drivers/identity/id_context.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/gallium/drivers/identity') diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index af3f8239ccd..29421849079 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -411,23 +411,22 @@ static void identity_set_constant_buffer(struct pipe_context *_pipe, uint shader, uint index, - struct pipe_resource *_resource) + struct pipe_constant_buffer *_cb) { struct identity_context *id_pipe = identity_context(_pipe); struct pipe_context *pipe = id_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 = identity_resource_unwrap(_resource); - resource = unwrapped_resource; + if (_cb) { + cb = *_cb; + cb.buffer = identity_resource_unwrap(_cb->buffer); } pipe->set_constant_buffer(pipe, shader, index, - resource); + _cb ? &cb : NULL); } static void -- cgit v1.2.3