diff options
author | Ilia Mirkin <[email protected]> | 2016-01-08 19:06:33 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-02-15 22:22:33 -0500 |
commit | bceff68114d5daab7a52a42db422ec8f6dc22328 (patch) | |
tree | 7e8056076338d9320efde9d925656086ac4ceaab /src/gallium/drivers | |
parent | cfbf25ac8f7bfe3e7bd9c8f55cf2c8072b7c9490 (diff) |
gallium: make image views non-persistent objects
Make them akin to shader buffers, with no refcounting/etc. Just used to
pass data about the bound image in ->set_shader_images.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/ddebug/dd_context.c | 28 | ||||
-rw-r--r-- | src/gallium/drivers/ddebug/dd_pipe.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 2 |
4 files changed, 4 insertions, 30 deletions
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c index 3ae7764ff3f..9dfaa0af289 100644 --- a/src/gallium/drivers/ddebug/dd_context.c +++ b/src/gallium/drivers/ddebug/dd_context.c @@ -415,30 +415,6 @@ dd_context_sampler_view_destroy(struct pipe_context *_pipe, pipe->sampler_view_destroy(pipe, view); } -static struct pipe_image_view * -dd_context_create_image_view(struct pipe_context *_pipe, - struct pipe_resource *resource, - const struct pipe_image_view *templ) -{ - struct pipe_context *pipe = dd_context(_pipe)->pipe; - struct pipe_image_view *view = - pipe->create_image_view(pipe, resource, templ); - - if (!view) - return NULL; - view->context = _pipe; - return view; -} - -static void -dd_context_image_view_destroy(struct pipe_context *_pipe, - struct pipe_image_view *view) -{ - struct pipe_context *pipe = dd_context(_pipe)->pipe; - - pipe->image_view_destroy(pipe, view); -} - static struct pipe_stream_output_target * dd_context_create_stream_output_target(struct pipe_context *_pipe, struct pipe_resource *res, @@ -486,7 +462,7 @@ dd_context_set_sampler_views(struct pipe_context *_pipe, unsigned shader, static void dd_context_set_shader_images(struct pipe_context *_pipe, unsigned shader, unsigned start, unsigned num, - struct pipe_image_view **views) + struct pipe_image_view *views) { struct dd_context *dctx = dd_context(_pipe); struct pipe_context *pipe = dctx->pipe; @@ -744,8 +720,6 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe) CTX_INIT(sampler_view_destroy); CTX_INIT(create_surface); CTX_INIT(surface_destroy); - CTX_INIT(create_image_view); - CTX_INIT(image_view_destroy); CTX_INIT(transfer_map); CTX_INIT(transfer_flush_region); CTX_INIT(transfer_unmap); diff --git a/src/gallium/drivers/ddebug/dd_pipe.h b/src/gallium/drivers/ddebug/dd_pipe.h index 80098dcb644..c9bbd569abe 100644 --- a/src/gallium/drivers/ddebug/dd_pipe.h +++ b/src/gallium/drivers/ddebug/dd_pipe.h @@ -94,7 +94,7 @@ struct dd_context struct pipe_constant_buffer constant_buffers[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS]; struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS]; struct dd_state *sampler_states[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS]; - struct pipe_image_view *shader_images[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_IMAGES]; + struct pipe_image_view shader_images[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_IMAGES]; struct pipe_shader_buffer shader_buffers[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_BUFFERS]; struct dd_state *velems; diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index 8dc2d38e039..f8d2637cc6f 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -1851,7 +1851,7 @@ ilo_set_sampler_views(struct pipe_context *pipe, unsigned shader, static void ilo_set_shader_images(struct pipe_context *pipe, unsigned shader, unsigned start, unsigned count, - struct pipe_image_view **views) + struct pipe_image_view *views) { #if 0 struct ilo_state_vector *vec = &ilo_context(pipe)->state_vector; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index cd3f1ff18d1..c73664e74a2 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -1231,7 +1231,7 @@ nvc0_set_compute_resources(struct pipe_context *pipe, static void nvc0_set_shader_images(struct pipe_context *pipe, unsigned shader, unsigned start_slot, unsigned count, - struct pipe_image_view **views) + struct pipe_image_view *views) { } |