diff options
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; |