[Mesa-dev] [PATCH 02/11] radeonsi: implement set_shader_buffers

Marek Olšák maraeo at gmail.com
Tue Mar 22 20:15:41 UTC 2016


On Tue, Mar 22, 2016 at 12:21 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> ---
>  src/gallium/drivers/radeonsi/si_descriptors.c |  61 +++++++++++++-
>  src/gallium/drivers/radeonsi/si_pipe.h        |   1 +
>  src/gallium/drivers/radeonsi/si_shader.c      |   5 +-
>  src/gallium/drivers/radeonsi/si_shader.h      | 114 +++++++++++++-------------
>  4 files changed, 123 insertions(+), 58 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
> index c7c30bf..72bd50f 100644
> --- a/src/gallium/drivers/radeonsi/si_descriptors.c
> +++ b/src/gallium/drivers/radeonsi/si_descriptors.c
> @@ -746,6 +746,55 @@ static void si_set_constant_buffer(struct pipe_context *ctx, uint shader, uint s
>         buffers->desc.list_dirty = true;
>  }
>
> +/* SHADER BUFFERS */
> +
> +static void si_set_shader_buffers(struct pipe_context *ctx, unsigned shader,
> +                                 unsigned start_slot, unsigned count,
> +                                 struct pipe_shader_buffer *sbuffers)
> +{
> +       struct si_context *sctx = (struct si_context *)ctx;
> +       struct si_buffer_resources *buffers = &sctx->shader_buffers[shader];
> +       unsigned i;
> +
> +       assert(start_slot + count <= SI_NUM_SHADER_BUFFERS);

SI_NUM_SHADER_BUFFERS should be defined in this patch.

Marek


More information about the mesa-dev mailing list