Module: Mesa
Branch: main
Commit: 9edd861eb1ad208be7f169a4ac45b0604fc05213
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9edd861eb1ad208be7f169a4ac45b0604fc05213

Author: Dave Airlie <[email protected]>
Date:   Tue Jul 26 14:10:30 2022 +1000

gallium: fixup some inconsistent uses of enum pipe_shader_type.

These should be the enum not unsigned.

Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]> (panfrost)
Reviewed-by: Juan A. Suarez Romero <[email protected]> (v3d)
Reviewed-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17747>

---

 src/gallium/auxiliary/driver_noop/noop_pipe.c    |  2 +-
 src/gallium/drivers/etnaviv/etnaviv_screen.c     |  2 +-
 src/gallium/drivers/freedreno/freedreno_screen.c |  2 +-
 src/gallium/drivers/panfrost/pan_job.h           |  2 +-
 src/gallium/drivers/tegra/tegra_context.c        | 10 +++++-----
 src/gallium/drivers/tegra/tegra_screen.c         |  4 ++--
 src/gallium/drivers/v3d/v3d_screen.c             |  4 ++--
 src/gallium/drivers/v3d/v3dx_state.c             |  2 +-
 src/gallium/drivers/virgl/virgl_screen.c         |  2 +-
 src/gallium/include/pipe/p_screen.h              |  2 +-
 10 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/gallium/auxiliary/driver_noop/noop_pipe.c 
b/src/gallium/auxiliary/driver_noop/noop_pipe.c
index 4a20c735e9f..b6e1306579e 100644
--- a/src/gallium/auxiliary/driver_noop/noop_pipe.c
+++ b/src/gallium/auxiliary/driver_noop/noop_pipe.c
@@ -634,7 +634,7 @@ static void noop_set_max_shader_compiler_threads(struct 
pipe_screen *screen,
 
 static bool noop_is_parallel_shader_compilation_finished(struct pipe_screen 
*screen,
                                                          void *shader,
-                                                         unsigned shader_type)
+                                                         enum pipe_shader_type 
shader_type)
 {
    return true;
 }
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 50e5010e7a1..e4cecb5024d 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -954,7 +954,7 @@ etna_screen_bo_from_handle(struct pipe_screen *pscreen,
 
 static const void *
 etna_get_compiler_options(struct pipe_screen *pscreen,
-                          enum pipe_shader_ir ir, unsigned shader)
+                          enum pipe_shader_ir ir, enum pipe_shader_type shader)
 {
    return etna_compiler_get_options(etna_screen(pscreen)->compiler);
 }
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index c2017d062b3..8aed1b7fbe7 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -803,7 +803,7 @@ fd_get_compute_param(struct pipe_screen *pscreen, enum 
pipe_shader_ir ir_type,
 
 static const void *
 fd_get_compiler_options(struct pipe_screen *pscreen, enum pipe_shader_ir ir,
-                        unsigned shader)
+                        enum pipe_shader_type shader)
 {
    struct fd_screen *screen = fd_screen(pscreen);
 
diff --git a/src/gallium/drivers/panfrost/pan_job.h 
b/src/gallium/drivers/panfrost/pan_job.h
index 6a41aeb2bde..b5c5c270ed8 100644
--- a/src/gallium/drivers/panfrost/pan_job.h
+++ b/src/gallium/drivers/panfrost/pan_job.h
@@ -221,7 +221,7 @@ panfrost_batch_write_rsrc(struct panfrost_batch *batch,
 
 struct panfrost_bo *
 panfrost_batch_create_bo(struct panfrost_batch *batch, size_t size,
-                         uint32_t create_flags, uint32_t access_flags,
+                         uint32_t create_flags, enum pipe_shader_type stage,
                          const char *label);
 
 void
diff --git a/src/gallium/drivers/tegra/tegra_context.c 
b/src/gallium/drivers/tegra/tegra_context.c
index 6c81e1509da..6e268a696e1 100644
--- a/src/gallium/drivers/tegra/tegra_context.c
+++ b/src/gallium/drivers/tegra/tegra_context.c
@@ -210,7 +210,7 @@ tegra_create_sampler_state(struct pipe_context *pcontext,
 }
 
 static void
-tegra_bind_sampler_states(struct pipe_context *pcontext, unsigned shader,
+tegra_bind_sampler_states(struct pipe_context *pcontext, enum pipe_shader_type 
shader,
                           unsigned start_slot, unsigned num_samplers,
                           void **samplers)
 {
@@ -475,7 +475,7 @@ tegra_set_clip_state(struct pipe_context *pcontext,
 }
 
 static void
-tegra_set_constant_buffer(struct pipe_context *pcontext, unsigned int shader,
+tegra_set_constant_buffer(struct pipe_context *pcontext, enum pipe_shader_type 
shader,
                           unsigned int index, bool take_ownership,
                           const struct pipe_constant_buffer *buf)
 {
@@ -559,7 +559,7 @@ tegra_set_viewport_states(struct pipe_context *pcontext, 
unsigned start_slot,
 }
 
 static void
-tegra_set_sampler_views(struct pipe_context *pcontext, unsigned shader,
+tegra_set_sampler_views(struct pipe_context *pcontext, enum pipe_shader_type 
shader,
                         unsigned start_slot, unsigned num_views,
                         unsigned unbind_num_trailing_slots,
                         bool take_ownership,
@@ -610,7 +610,7 @@ tegra_set_debug_callback(struct pipe_context *pcontext,
 }
 
 static void
-tegra_set_shader_buffers(struct pipe_context *pcontext, unsigned int shader,
+tegra_set_shader_buffers(struct pipe_context *pcontext, enum pipe_shader_type 
shader,
                          unsigned start, unsigned count,
                          const struct pipe_shader_buffer *buffers,
                          unsigned writable_bitmask)
@@ -622,7 +622,7 @@ tegra_set_shader_buffers(struct pipe_context *pcontext, 
unsigned int shader,
 }
 
 static void
-tegra_set_shader_images(struct pipe_context *pcontext, unsigned int shader,
+tegra_set_shader_images(struct pipe_context *pcontext, enum pipe_shader_type 
shader,
                         unsigned start, unsigned count,
                         unsigned unbind_num_trailing_slots,
                         const struct pipe_image_view *images)
diff --git a/src/gallium/drivers/tegra/tegra_screen.c 
b/src/gallium/drivers/tegra/tegra_screen.c
index 3c4c36e0c94..18bc624ca6c 100644
--- a/src/gallium/drivers/tegra/tegra_screen.c
+++ b/src/gallium/drivers/tegra/tegra_screen.c
@@ -89,7 +89,7 @@ tegra_screen_get_paramf(struct pipe_screen *pscreen, enum 
pipe_capf param)
 }
 
 static int
-tegra_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+tegra_screen_get_shader_param(struct pipe_screen *pscreen, enum 
pipe_shader_type shader,
                               enum pipe_shader_cap param)
 {
    struct tegra_screen *screen = to_tegra_screen(pscreen);
@@ -445,7 +445,7 @@ tegra_screen_query_memory_info(struct pipe_screen *pscreen,
 static const void *
 tegra_screen_get_compiler_options(struct pipe_screen *pscreen,
                                   enum pipe_shader_ir ir,
-                                  unsigned int shader)
+                                  enum pipe_shader_type shader)
 {
    struct tegra_screen *screen = to_tegra_screen(pscreen);
    const void *options = NULL;
diff --git a/src/gallium/drivers/v3d/v3d_screen.c 
b/src/gallium/drivers/v3d/v3d_screen.c
index 6c2b2bf6f84..6b79a4978cb 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -346,7 +346,7 @@ v3d_screen_get_paramf(struct pipe_screen *pscreen, enum 
pipe_capf param)
 }
 
 static int
-v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+v3d_screen_get_shader_param(struct pipe_screen *pscreen, enum pipe_shader_type 
shader,
                            enum pipe_shader_cap param)
 {
         struct v3d_screen *screen = v3d_screen(pscreen);
@@ -745,7 +745,7 @@ static const nir_shader_compiler_options v3d_nir_options = {
 
 static const void *
 v3d_screen_get_compiler_options(struct pipe_screen *pscreen,
-                                enum pipe_shader_ir ir, unsigned shader)
+                                enum pipe_shader_ir ir, enum pipe_shader_type 
shader)
 {
         return &v3d_nir_options;
 }
diff --git a/src/gallium/drivers/v3d/v3dx_state.c 
b/src/gallium/drivers/v3d/v3dx_state.c
index b4d1a53f75f..b7651def3a7 100644
--- a/src/gallium/drivers/v3d/v3dx_state.c
+++ b/src/gallium/drivers/v3d/v3dx_state.c
@@ -456,7 +456,7 @@ v3d_vertex_state_bind(struct pipe_context *pctx, void 
*hwcso)
 }
 
 static void
-v3d_set_constant_buffer(struct pipe_context *pctx, uint shader, uint index,
+v3d_set_constant_buffer(struct pipe_context *pctx, enum pipe_shader_type 
shader, uint index,
                         bool take_ownership,
                         const struct pipe_constant_buffer *cb)
 {
diff --git a/src/gallium/drivers/virgl/virgl_screen.c 
b/src/gallium/drivers/virgl/virgl_screen.c
index 3c113f83df4..63026cc7b39 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -1010,7 +1010,7 @@ fixup_renderer(union virgl_caps *caps)
 static const void *
 virgl_get_compiler_options(struct pipe_screen *pscreen,
                            enum pipe_shader_ir ir,
-                           unsigned shader)
+                           enum pipe_shader_type shader)
 {
    struct virgl_screen *vscreen = virgl_screen(pscreen);
 
diff --git a/src/gallium/include/pipe/p_screen.h 
b/src/gallium/include/pipe/p_screen.h
index 596319426e2..8bc1a2de2d8 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -571,7 +571,7 @@ struct pipe_screen {
     */
    bool (*is_parallel_shader_compilation_finished)(struct pipe_screen *screen,
                                                    void *shader,
-                                                   unsigned shader_type);
+                                                   enum pipe_shader_type 
shader_type);
 
    /**
     * Set the damage region (called when KHR_partial_update() is invoked).

Reply via email to