gallium: remove pipe_context::set_compute_resources and PIPE_BIND_COMPUTE_RESOURCE

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34623>
This commit is contained in:
Karol Herbst
2025-04-20 16:48:30 +02:00
parent 502b821ea3
commit a990ada276
7 changed files with 2 additions and 50 deletions
+1 -3
View File
@@ -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
-2
View File
@@ -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.
@@ -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 */
@@ -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);
@@ -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;
-16
View File
@@ -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
+1 -1
View File
@@ -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 */