gallium: make shader_buffers const
authorRob Clark <robclark@freedesktop.org>
Tue, 7 Jun 2016 16:49:37 +0000 (12:49 -0400)
committerRob Clark <robclark@freedesktop.org>
Mon, 20 Jun 2016 16:36:20 +0000 (12:36 -0400)
Be consistent with the rest of the "set_xyz" state interfaces.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/ddebug/dd_context.c
src/gallium/drivers/nouveau/nvc0/nvc0_state.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/softpipe/sp_state_image.c
src/gallium/drivers/trace/tr_context.c
src/gallium/include/pipe/p_context.h

index 0f8ef18ee546f8977ee3214e8a98d4cababd9f13..b88df92900687641d13a3acc2dee851f7139c863 100644 (file)
@@ -504,7 +504,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;
index 7e42be76bf1a5684295c15f937aebb6022f37fb9..2fbe8172bc1dbee73e66874c00fd23108c6e9d9b 100644 (file)
@@ -1332,8 +1332,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;
@@ -1383,7 +1383,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))
index 2d780e6e46953862c535d9e3ed3f892bb2ebb03f..5ad251f2d3f264dee3b4029adb5bc26fad41e5a9 100644 (file)
@@ -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;
index b1810d3591fc72b57c9049a7f002a7430d80787f..81bb7ca88ee09cc151e7d053c1809c51518f8f9f 100644 (file)
@@ -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;
index 18c5c4345a72d7fc769b2067a2c65e75a55560c9..7ea5946542a6845b6e06465357d9ef7a874595b7 100644 (file)
@@ -1671,7 +1671,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;
index 6fde8753a72178abc95d39ac1efa4ab77912c400..7319835bcdb62e4ff3b1cfb927203d53262bbe66 100644 (file)
@@ -314,7 +314,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.