diff options
author | Marek Olšák <[email protected]> | 2012-05-11 16:38:13 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-05-11 16:38:13 +0200 |
commit | bb4c5d72d7c7cb1d9e7016e2c07c36875f30011a (patch) | |
tree | 153444ff535900f82ae63b5af8ccd09fb2f063af /src/gallium/drivers/galahad/glhd_context.c | |
parent | 96956dc5076fc03b9290368ca90e3f3b870ee613 (diff) | |
parent | 8dd3e341b337ca2d22bcc0e7548a78a6c36ca77d (diff) |
Merge branch 'gallium-userbuf'
Conflicts:
src/gallium/docs/source/screen.rst
src/gallium/drivers/nv50/nv50_state.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_draw.c
Diffstat (limited to 'src/gallium/drivers/galahad/glhd_context.c')
-rw-r--r-- | src/gallium/drivers/galahad/glhd_context.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c index 0bb18884c8d..4dae61ca64a 100644 --- a/src/gallium/drivers/galahad/glhd_context.c +++ b/src/gallium/drivers/galahad/glhd_context.c @@ -458,12 +458,11 @@ static void galahad_set_constant_buffer(struct pipe_context *_pipe, uint shader, uint index, - struct pipe_resource *_resource) + struct pipe_constant_buffer *_cb) { struct galahad_context *glhd_pipe = galahad_context(_pipe); struct pipe_context *pipe = glhd_pipe->pipe; - struct pipe_resource *unwrapped_resource; - struct pipe_resource *resource = NULL; + struct pipe_constant_buffer cb; if (shader >= PIPE_SHADER_TYPES) { glhd_error("Unknown shader type %u", shader); @@ -479,15 +478,15 @@ galahad_set_constant_buffer(struct pipe_context *_pipe, } /* XXX hmm? unwrap the input state */ - if (_resource) { - unwrapped_resource = galahad_resource_unwrap(_resource); - resource = unwrapped_resource; + if (_cb) { + cb = *_cb; + cb.buffer = galahad_resource_unwrap(_cb->buffer); } pipe->set_constant_buffer(pipe, shader, index, - resource); + _cb ? &cb : NULL); } static void @@ -949,19 +948,6 @@ galahad_context_transfer_inline_write(struct pipe_context *_context, } -static void galahad_redefine_user_buffer(struct pipe_context *_context, - struct pipe_resource *_resource, - unsigned offset, unsigned size) -{ - struct galahad_context *glhd_context = galahad_context(_context); - struct galahad_resource *glhd_resource = galahad_resource(_resource); - struct pipe_context *context = glhd_context->pipe; - struct pipe_resource *resource = glhd_resource->resource; - - context->redefine_user_buffer(context, resource, offset, size); -} - - struct pipe_context * galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) { @@ -1034,7 +1020,6 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) glhd_pipe->base.transfer_unmap = galahad_context_transfer_unmap; glhd_pipe->base.transfer_flush_region = galahad_context_transfer_flush_region; glhd_pipe->base.transfer_inline_write = galahad_context_transfer_inline_write; - glhd_pipe->base.redefine_user_buffer = galahad_redefine_user_buffer; glhd_pipe->pipe = pipe; |