gallium: Use enum pipe_shader_type in set_shader_buffers()
authorKai Wasserbäch <kai@dev.carbon-project.org>
Sat, 27 Aug 2016 10:08:00 +0000 (04:08 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 29 Aug 2016 15:07:33 +0000 (09:07 -0600)
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
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
src/mesa/state_tracker/st_atom_atomicbuf.c
src/mesa/state_tracker/st_atom_storagebuf.c

index c9b0e3fcf43a647f495ba04dc5bfa108dffb6512..ee1e184e798bc494599899065069d5c7e2d2106f 100644 (file)
@@ -1409,7 +1409,7 @@ nvc0_bind_buffers_range(struct nvc0_context *nvc0, const unsigned t,
 
 static void
 nvc0_set_shader_buffers(struct pipe_context *pipe,
-                        unsigned shader,
+                        enum pipe_shader_type shader,
                         unsigned start, unsigned nr,
                         const struct pipe_shader_buffer *buffers)
 {
index 573c8a858174cd7afd374ffe4db73d3c1e6fad43..dfd0607891d665d982116c861740a64cadc7a75d 100644 (file)
@@ -1060,19 +1060,21 @@ static void si_pipe_set_constant_buffer(struct pipe_context *ctx,
 /* SHADER BUFFERS */
 
 static unsigned
-si_shader_buffer_descriptors_idx(unsigned shader)
+si_shader_buffer_descriptors_idx(enum pipe_shader_type shader)
 {
        return SI_DESCS_FIRST_SHADER + shader * SI_NUM_SHADER_DESCS +
               SI_SHADER_DESCS_SHADER_BUFFERS;
 }
 
 static struct si_descriptors *
-si_shader_buffer_descriptors(struct si_context *sctx, unsigned shader)
+si_shader_buffer_descriptors(struct si_context *sctx,
+                                 enum pipe_shader_type shader)
 {
        return &sctx->descriptors[si_shader_buffer_descriptors_idx(shader)];
 }
 
-static void si_set_shader_buffers(struct pipe_context *ctx, unsigned shader,
+static void si_set_shader_buffers(struct pipe_context *ctx,
+                                 enum pipe_shader_type shader,
                                  unsigned start_slot, unsigned count,
                                  const struct pipe_shader_buffer *sbuffers)
 {
index 553a76a2c870eb71e8698746b30c83ada7d09e80..c5ef466e1311a2da58b92fc6d2fcf573d60fcb78 100644 (file)
@@ -53,7 +53,7 @@ static void softpipe_set_shader_images(struct pipe_context *pipe,
 }
 
 static void softpipe_set_shader_buffers(struct pipe_context *pipe,
-                                        unsigned shader,
+                                        enum pipe_shader_type shader,
                                         unsigned start,
                                         unsigned num,
                                         const struct pipe_shader_buffer *buffers)
index a648297fa9bb0944d850d923896977f9eabddf5f..61b69c23cee6e10cbab76bccc114eeb52b41ec27 100644 (file)
@@ -1711,7 +1711,7 @@ trace_context_set_tess_state(struct pipe_context *_context,
 
 
 static void trace_context_set_shader_buffers(struct pipe_context *_context,
-                                             unsigned shader,
+                                             enum pipe_shader_type shader,
                                              unsigned start, unsigned nr,
                                              const struct pipe_shader_buffer *buffers)
 {
index b74679d1f82e773c6c9986d3544311622d1309e7..bea192477c8642a834bbafb2dec9d70635aaefc0 100644 (file)
@@ -314,7 +314,8 @@ struct pipe_context {
     *                   unless it's NULL, in which case no buffers will
     *                   be bound.
     */
-   void (*set_shader_buffers)(struct pipe_context *, unsigned shader,
+   void (*set_shader_buffers)(struct pipe_context *,
+                              enum pipe_shader_type shader,
                               unsigned start_slot, unsigned count,
                               const struct pipe_shader_buffer *buffers);
 
index 7dde76a77f1ab8980f95f2ba3e217b384f034053..f48ae61377f6c430ac432e4ce46ec571e441292e 100644 (file)
@@ -43,7 +43,7 @@
 static void
 st_bind_atomics(struct st_context *st,
                 struct gl_shader_program *prog,
-                unsigned shader_type)
+                enum pipe_shader_type shader_type)
 {
    unsigned i;
 
index a5a760e5ac0bca863586baf1541e31701b7b726d..1b6ed99e54a7b938625e1d1b460978734130ead8 100644 (file)
@@ -42,7 +42,7 @@
 
 static void
 st_bind_ssbos(struct st_context *st, struct gl_linked_shader *shader,
-              unsigned shader_type)
+              enum pipe_shader_type shader_type)
 {
    unsigned i;
    struct pipe_shader_buffer buffers[MAX_SHADER_STORAGE_BUFFERS];