diff --git a/docs/gallium/context.rst b/docs/gallium/context.rst index b7f4f38968d..5559504163c 100644 --- a/docs/gallium/context.rst +++ b/docs/gallium/context.rst @@ -868,9 +868,7 @@ The compute program has access to four special resources: These resources use a byte-based addressing scheme, and they can be accessed from the compute program by means of the LOAD/STORE TGSI -opcodes. Additional resources to be accessed using the same opcodes -may be specified by the user with the ``set_compute_resources`` -method. +opcodes. In addition, normal texture sampling is allowed from the compute program: ``bind_sampler_states`` may be used to set up texture diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst index 0e6c49d3c47..142e41a4e1d 100644 --- a/docs/gallium/screen.rst +++ b/docs/gallium/screen.rst @@ -825,8 +825,6 @@ resources might be created and handled quite differently. to a shader and can be used with load, store, and atomic instructions. * ``PIPE_BIND_SHADER_IMAGE``: A buffer or texture with a format that can be bound to a shader and can be used with load, store, and atomic instructions. -* ``PIPE_BIND_COMPUTE_RESOURCE``: A buffer or texture that can be - bound to the compute program as a shader resource. * ``PIPE_BIND_COMMAND_ARGS_BUFFER``: A buffer that may be sourced by the GPU command processor. It can contain, for example, the arguments to indirect draw calls. diff --git a/src/gallium/auxiliary/driver_ddebug/dd_context.c b/src/gallium/auxiliary/driver_ddebug/dd_context.c index aed0fa35418..de889e1327c 100644 --- a/src/gallium/auxiliary/driver_ddebug/dd_context.c +++ b/src/gallium/auxiliary/driver_ddebug/dd_context.c @@ -708,15 +708,6 @@ dd_context_resource_commit(struct pipe_context *_pipe, return pipe->resource_commit(pipe, resource, level, box, commit); } -static void -dd_context_set_compute_resources(struct pipe_context *_pipe, - unsigned start, unsigned count, - struct pipe_surface **resources) -{ - struct pipe_context *pipe = dd_context(_pipe)->pipe; - pipe->set_compute_resources(pipe, start, count, resources); -} - static void dd_context_set_global_binding(struct pipe_context *_pipe, unsigned first, unsigned count, @@ -949,7 +940,6 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe) CTX_INIT(texture_barrier); CTX_INIT(memory_barrier); CTX_INIT(resource_commit); - CTX_INIT(set_compute_resources); CTX_INIT(set_global_binding); /* create_video_codec */ /* create_video_buffer */ diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index fd835e209c1..185d639ab23 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2221,17 +2221,6 @@ tc_set_stream_output_targets(struct pipe_context *_pipe, tc->seen_streamout_buffers = true; } -static void -tc_set_compute_resources(struct pipe_context *_pipe, unsigned start, - unsigned count, struct pipe_surface **resources) -{ - struct threaded_context *tc = threaded_context(_pipe); - struct pipe_context *pipe = tc->pipe; - - tc_sync(tc); - pipe->set_compute_resources(pipe, start, count, resources); -} - static void tc_set_global_binding(struct pipe_context *_pipe, unsigned first, unsigned count, struct pipe_resource **resources, @@ -5483,7 +5472,6 @@ threaded_context_create(struct pipe_context *pipe, CTX_INIT(resource_commit); CTX_INIT(create_video_codec); CTX_INIT(create_video_buffer); - CTX_INIT(set_compute_resources); CTX_INIT(set_global_binding); CTX_INIT(get_sample_position); CTX_INIT(invalidate_resource); diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index c6c181f24e4..c400d8c09f2 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -1051,18 +1051,12 @@ static void si_delete_compute_state(struct pipe_context *ctx, void *state) si_compute_reference(&program, NULL); } -static void si_set_compute_resources(struct pipe_context *ctx_, unsigned start, unsigned count, - struct pipe_surface **surfaces) -{ -} - void si_init_compute_functions(struct si_context *sctx) { sctx->b.create_compute_state = si_create_compute_state; sctx->b.delete_compute_state = si_delete_compute_state; sctx->b.bind_compute_state = si_bind_compute_state; sctx->b.get_compute_state_info = si_get_compute_state_info; - sctx->b.set_compute_resources = si_set_compute_resources; sctx->b.set_global_binding = si_set_global_binding; sctx->b.launch_grid = si_launch_grid; diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index cd51d245d15..2ae7037a1c0 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -976,22 +976,6 @@ struct pipe_context { uint32_t (*get_compute_state_subgroup_size)(struct pipe_context *, void *, const uint32_t block[3]); - /** - * Bind an array of shader resources that will be used by the - * compute program. Any resources that were previously bound to - * the specified range will be unbound after this call. - * - * \param start first resource to bind. - * \param count number of consecutive resources to bind. - * \param resources array of pointers to the resources to bind, it - * should contain at least \a count elements - * unless it's NULL, in which case no new - * resources will be bound. - */ - void (*set_compute_resources)(struct pipe_context *, - unsigned start, unsigned count, - struct pipe_surface **resources); - /** * Bind an array of buffers to be mapped into the address space of * the GLOBAL resource. Any buffers that were previously bound diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 28eb94c6657..b8afd6acc5b 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -470,7 +470,7 @@ enum pipe_flush_flags #define PIPE_BIND_GLOBAL (1 << 13) /* set_global_binding */ #define PIPE_BIND_SHADER_BUFFER (1 << 14) /* set_shader_buffers */ #define PIPE_BIND_SHADER_IMAGE (1 << 15) /* set_shader_images */ -#define PIPE_BIND_COMPUTE_RESOURCE (1 << 16) /* set_compute_resources */ +/* gap */ #define PIPE_BIND_COMMAND_ARGS_BUFFER (1 << 17) /* pipe_draw_info.indirect */ #define PIPE_BIND_QUERY_BUFFER (1 << 18) /* get_query_result_resource */