[Mesa-dev] [PATCH 02/10] gallium: make shader_buffers const
Rob Clark
robdclark at gmail.com
Tue Jun 14 15:57:54 UTC 2016
From: Rob Clark <robclark at freedesktop.org>
Be consistent with the rest of the "set_xyz" state interfaces.
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/gallium/drivers/ddebug/dd_context.c | 2 +-
src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 6 +++---
src/gallium/drivers/radeonsi/si_descriptors.c | 4 ++--
src/gallium/drivers/softpipe/sp_state_image.c | 2 +-
src/gallium/drivers/trace/tr_context.c | 2 +-
src/gallium/include/pipe/p_context.h | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index 06b7c91..07c46dd 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -503,7 +503,7 @@ dd_context_set_shader_images(struct pipe_context *_pipe, unsigned shader,
static void
dd_context_set_shader_buffers(struct pipe_context *_pipe, unsigned shader,
unsigned start, unsigned num_buffers,
- struct pipe_shader_buffer *buffers)
+ const struct pipe_shader_buffer *buffers)
{
struct dd_context *dctx = dd_context(_pipe);
struct pipe_context *pipe = dctx->pipe;
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
index a9c1830..d10a88d 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
@@ -1315,8 +1315,8 @@ nvc0_set_shader_images(struct pipe_context *pipe, unsigned shader,
static bool
nvc0_bind_buffers_range(struct nvc0_context *nvc0, const unsigned t,
- unsigned start, unsigned nr,
- struct pipe_shader_buffer *pbuffers)
+ unsigned start, unsigned nr,
+ const struct pipe_shader_buffer *pbuffers)
{
const unsigned end = start + nr;
unsigned mask = 0;
@@ -1366,7 +1366,7 @@ static void
nvc0_set_shader_buffers(struct pipe_context *pipe,
unsigned shader,
unsigned start, unsigned nr,
- struct pipe_shader_buffer *buffers)
+ const struct pipe_shader_buffer *buffers)
{
const unsigned s = nvc0_shader_stage(shader);
if (!nvc0_bind_buffers_range(nvc0_context(pipe), s, start, nr, buffers))
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 2d780e6..5ad251f 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1040,7 +1040,7 @@ si_shader_buffer_descriptors(struct si_context *sctx, unsigned shader)
static void si_set_shader_buffers(struct pipe_context *ctx, unsigned shader,
unsigned start_slot, unsigned count,
- struct pipe_shader_buffer *sbuffers)
+ const struct pipe_shader_buffer *sbuffers)
{
struct si_context *sctx = (struct si_context *)ctx;
struct si_buffer_resources *buffers = &sctx->shader_buffers[shader];
@@ -1050,7 +1050,7 @@ static void si_set_shader_buffers(struct pipe_context *ctx, unsigned shader,
assert(start_slot + count <= SI_NUM_SHADER_BUFFERS);
for (i = 0; i < count; ++i) {
- struct pipe_shader_buffer *sbuffer = sbuffers ? &sbuffers[i] : NULL;
+ const struct pipe_shader_buffer *sbuffer = sbuffers ? &sbuffers[i] : NULL;
struct r600_resource *buf;
unsigned slot = start_slot + i;
uint32_t *desc = descs->list + slot * 4;
diff --git a/src/gallium/drivers/softpipe/sp_state_image.c b/src/gallium/drivers/softpipe/sp_state_image.c
index b1810d3..81bb7ca 100644
--- a/src/gallium/drivers/softpipe/sp_state_image.c
+++ b/src/gallium/drivers/softpipe/sp_state_image.c
@@ -56,7 +56,7 @@ static void softpipe_set_shader_buffers(struct pipe_context *pipe,
unsigned shader,
unsigned start,
unsigned num,
- struct pipe_shader_buffer *buffers)
+ const struct pipe_shader_buffer *buffers)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
unsigned i;
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 0dd07e9..041a47c 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1670,7 +1670,7 @@ trace_context_set_tess_state(struct pipe_context *_context,
static void trace_context_set_shader_buffers(struct pipe_context *_context,
unsigned shader,
unsigned start, unsigned nr,
- struct pipe_shader_buffer *buffers)
+ const struct pipe_shader_buffer *buffers)
{
struct trace_context *tr_context = trace_context(_context);
struct pipe_context *context = tr_context->pipe;
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 9eb4a87..b0d10bf 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -309,7 +309,7 @@ struct pipe_context {
*/
void (*set_shader_buffers)(struct pipe_context *, unsigned shader,
unsigned start_slot, unsigned count,
- struct pipe_shader_buffer *buffers);
+ const struct pipe_shader_buffer *buffers);
/**
* Bind an array of images that will be used by a shader.
--
2.5.5
More information about the mesa-dev
mailing list