panfrost: Implement panfrost_set_shader_buffers callback
Just copy over the passed SSBO for now. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -2330,6 +2330,20 @@ panfrost_sampler_view_destroy(
|
||||
ralloc_free(view);
|
||||
}
|
||||
|
||||
static void
|
||||
panfrost_set_shader_buffers(
|
||||
struct pipe_context *pctx,
|
||||
enum pipe_shader_type shader,
|
||||
unsigned start, unsigned count,
|
||||
const struct pipe_shader_buffer *buffers,
|
||||
unsigned writable_bitmask)
|
||||
{
|
||||
struct panfrost_context *ctx = pan_context(pctx);
|
||||
|
||||
util_set_shader_buffers_mask(ctx->ssbo[shader], &ctx->ssbo_mask[shader],
|
||||
buffers, start, count);
|
||||
}
|
||||
|
||||
/* Hints that a framebuffer should use AFBC where possible */
|
||||
|
||||
static void
|
||||
@@ -2693,6 +2707,7 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
|
||||
|
||||
gallium->set_vertex_buffers = panfrost_set_vertex_buffers;
|
||||
gallium->set_constant_buffer = panfrost_set_constant_buffer;
|
||||
gallium->set_shader_buffers = panfrost_set_shader_buffers;
|
||||
|
||||
gallium->set_stencil_ref = panfrost_set_stencil_ref;
|
||||
|
||||
|
||||
@@ -156,6 +156,9 @@ struct panfrost_context {
|
||||
struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS];
|
||||
uint32_t vb_mask;
|
||||
|
||||
struct pipe_shader_buffer ssbo[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_BUFFERS];
|
||||
uint32_t ssbo_mask[PIPE_SHADER_TYPES];
|
||||
|
||||
struct panfrost_sampler_state *samplers[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
|
||||
unsigned sampler_count[PIPE_SHADER_TYPES];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user