gallium: s/unsigned/enum pipe_shader_type/ for pipe_screen::get_shader_param()
authorBrian Paul <brianp@vmware.com>
Sun, 5 Mar 2017 19:13:02 +0000 (12:13 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 8 Mar 2017 15:50:20 +0000 (08:50 -0700)
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
23 files changed:
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/util/u_inlines.h
src/gallium/drivers/ddebug/dd_screen.c
src/gallium/drivers/etnaviv/etnaviv_screen.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/noop/noop_pipe.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/rbug/rbug_screen.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/swr/swr_screen.cpp
src/gallium/drivers/trace/tr_screen.c
src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/include/pipe/p_screen.h

index 56abcff5a248addaa4f25603ce0df64c1231952d..46dd0b4128f76ce66eac4d839d0c95315c618206 100644 (file)
@@ -1036,7 +1036,8 @@ draw_set_mapped_texture(struct draw_context *draw,
  * different ways of setting textures, and drivers typically only support one.
  */
 int
-draw_get_shader_param_no_llvm(unsigned shader, enum pipe_shader_cap param)
+draw_get_shader_param_no_llvm(enum pipe_shader_type shader,
+                              enum pipe_shader_cap param)
 {
    switch(shader) {
    case PIPE_SHADER_VERTEX:
@@ -1054,7 +1055,7 @@ draw_get_shader_param_no_llvm(unsigned shader, enum pipe_shader_cap param)
  * draw_get_shader_param_no_llvm instead.
  */
 int
-draw_get_shader_param(unsigned shader, enum pipe_shader_cap param)
+draw_get_shader_param(enum pipe_shader_type shader, enum pipe_shader_cap param)
 {
 
 #ifdef HAVE_LLVM
index 145fc2ed467bba4de79d98a367972d90e879221b..e605cd6a5fb9b3991005057d0ae66471eb0f13b9 100644 (file)
@@ -299,10 +299,11 @@ boolean draw_need_pipeline(const struct draw_context *draw,
                            unsigned prim );
 
 int
-draw_get_shader_param(unsigned shader, enum pipe_shader_cap param);
+draw_get_shader_param(enum pipe_shader_type shader, enum pipe_shader_cap param);
 
 int
-draw_get_shader_param_no_llvm(unsigned shader, enum pipe_shader_cap param);
+draw_get_shader_param_no_llvm(enum pipe_shader_type shader,
+                              enum pipe_shader_cap param);
 
 boolean
 draw_get_option_use_llvm(void);
index b7b83135838e6b7e72fd9236a912019062942cf4..6bc5e6660f97cd56046937471b019ecc9dfe726a 100644 (file)
@@ -458,7 +458,8 @@ pipe_transfer_unmap( struct pipe_context *context,
 }
 
 static inline void
-pipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
+pipe_set_constant_buffer(struct pipe_context *pipe,
+                         enum pipe_shader_type shader, uint index,
                          struct pipe_resource *buf)
 {
    if (buf) {
index 0e8bd48fe61735c0ad901f071e6bdddf3c61c4ee..9642532bc023a13e0f0b44063bbfb29f69845750 100644 (file)
@@ -93,7 +93,8 @@ dd_screen_get_compute_param(struct pipe_screen *_screen,
 }
 
 static int
-dd_screen_get_shader_param(struct pipe_screen *_screen, unsigned shader,
+dd_screen_get_shader_param(struct pipe_screen *_screen,
+                           enum pipe_shader_type shader,
                            enum pipe_shader_cap param)
 {
    struct pipe_screen *screen = dd_screen(_screen)->screen;
index ab436b969c94a4eaff43c2125ef08a200c323118..0cd2737deb645345a01e55bdc4bd6f9ad8a1fedb 100644 (file)
@@ -353,7 +353,8 @@ etna_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_capf param)
 }
 
 static int
-etna_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+etna_screen_get_shader_param(struct pipe_screen *pscreen,
+                             enum pipe_shader_type shader,
                              enum pipe_shader_cap param)
 {
    struct etna_screen *screen = etna_screen(pscreen);
index 4a461fd511c5920021205ca5c29db0f8a4b7e0ec..db6b8a43fc5cf5d354485d052a902660c51da882 100644 (file)
@@ -430,7 +430,8 @@ fd_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_capf param)
 }
 
 static int
-fd_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+fd_screen_get_shader_param(struct pipe_screen *pscreen,
+                                                  enum pipe_shader_type shader,
                enum pipe_shader_cap param)
 {
        struct fd_screen *screen = fd_screen(pscreen);
index 28703b89edfe3567a43c51c694ffec4ba1969e46..62643f7c64f957ffedfcc3f41b84b0e7b923558a 100644 (file)
@@ -107,7 +107,9 @@ i915_get_name(struct pipe_screen *screen)
 }
 
 static int
-i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap cap)
+i915_get_shader_param(struct pipe_screen *screen,
+                      enum pipe_shader_type shader,
+                      enum pipe_shader_cap cap)
 {
    switch(shader) {
    case PIPE_SHADER_VERTEX:
index 4bc202c497e990e6c5516084c62a5546204e5bd9..e0fe637cf411c683b7192824bab84d3723381021 100644 (file)
@@ -354,7 +354,9 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
 }
 
 static int
-llvmpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param)
+llvmpipe_get_shader_param(struct pipe_screen *screen,
+                          enum pipe_shader_type shader,
+                          enum pipe_shader_cap param)
 {
    switch(shader)
    {
index db2375e2e5dc22e3c806e9253afc46fb681dd3f1..d1e795dab16309370054ba17d2bb4c5464637122 100644 (file)
@@ -391,7 +391,9 @@ static float noop_get_paramf(struct pipe_screen* pscreen,
    return screen->get_paramf(screen, param);
 }
 
-static int noop_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enum pipe_shader_cap param)
+static int noop_get_shader_param(struct pipe_screen* pscreen,
+                                 enum pipe_shader_type shader,
+                                 enum pipe_shader_cap param)
 {
    struct pipe_screen *screen = ((struct noop_pipe_screen*)pscreen)->oscreen;
 
index bc31810cad9a2872908f0f7ce0050609ab396d61..414a5c8f6c3bc8229fed757841f73175bd8e514c 100644 (file)
@@ -258,7 +258,8 @@ nv30_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_capf param)
 }
 
 static int
-nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+nv30_screen_get_shader_param(struct pipe_screen *pscreen,
+                             enum pipe_shader_type shader,
                              enum pipe_shader_cap param)
 {
    struct nv30_screen *screen = nv30_screen(pscreen);
index 83f67cac6c16a1a9eec5b267e2152e99e118338d..29a4d9de192b77d71036fbfe7c159af4af25ffc0 100644 (file)
@@ -287,7 +287,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 }
 
 static int
-nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+nv50_screen_get_shader_param(struct pipe_screen *pscreen,
+                             enum pipe_shader_type shader,
                              enum pipe_shader_cap param)
 {
    switch (shader) {
index 643eb4305f8b2f659463353acfd0becad8ac87c1..b7ce13a3c4d8231f20d5be6b6734a31c788557ad 100644 (file)
@@ -309,7 +309,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 }
 
 static int
-nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
+nvc0_screen_get_shader_param(struct pipe_screen *pscreen,
+                             enum pipe_shader_type shader,
                              enum pipe_shader_cap param)
 {
    const uint16_t class_3d = nouveau_screen(pscreen)->class_3d;
index 9a2400df935f11d76dcf8126a188a56ca779c947..624015c2e0a72341f299b3782bacb7174f9ff2da 100644 (file)
@@ -289,7 +289,9 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
     return 0;
 }
 
-static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum pipe_shader_cap param)
+static int r300_get_shader_param(struct pipe_screen *pscreen,
+                                 enum pipe_shader_type shader,
+                                 enum pipe_shader_cap param)
 {
    struct r300_screen* r300screen = r300_screen(pscreen);
    boolean is_r400 = r300screen->caps.is_r400;
@@ -417,6 +419,8 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e
             return 0;
         }
         break;
+    default:
+        ; /* nothing */
     }
     return 0;
 }
index 68c4cccdf5f95b6e49e628ae2062e8a672f9e78a..49aab6b7fb8f02367dc32a7a447ccf93355b508a 100644 (file)
@@ -484,7 +484,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        return 0;
 }
 
-static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enum pipe_shader_cap param)
+static int r600_get_shader_param(struct pipe_screen* pscreen,
+                                enum pipe_shader_type shader,
+                                enum pipe_shader_cap param)
 {
        struct r600_screen *rscreen = (struct r600_screen *)pscreen;
 
index 1550326f8ed7acf982400d1737e0265afe4b55a7..300615f6a93801c7b063c0a3761720526b03cf6f 100644 (file)
@@ -564,7 +564,9 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        return 0;
 }
 
-static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enum pipe_shader_cap param)
+static int si_get_shader_param(struct pipe_screen* pscreen,
+                              enum pipe_shader_type shader,
+                              enum pipe_shader_cap param)
 {
        struct si_screen *sscreen = (struct si_screen *)pscreen;
 
index 7505dd750a5322716f159d7a1d123e5f09c88cbf..b12f029b3ea1a5f6dad50ab4d3c6c872229cf8d3 100644 (file)
@@ -98,7 +98,8 @@ rbug_screen_get_param(struct pipe_screen *_screen,
 
 static int
 rbug_screen_get_shader_param(struct pipe_screen *_screen,
-                      unsigned shader, enum pipe_shader_cap param)
+                             enum pipe_shader_type shader,
+                             enum pipe_shader_cap param)
 {
    struct rbug_screen *rb_screen = rbug_screen(_screen);
    struct pipe_screen *screen = rb_screen->screen;
index 8cd1873ce2ddffb8d158cbd480963af9736f47d7..7ed13a570f7c0fb7d5f940802ce47489c8d5aacf 100644 (file)
@@ -306,7 +306,9 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
 }
 
 static int
-softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param)
+softpipe_get_shader_param(struct pipe_screen *screen,
+                          enum pipe_shader_type shader,
+                          enum pipe_shader_cap param)
 {
    struct softpipe_screen *sp_screen = softpipe_screen(screen);
    switch(shader)
index 72c142d6cf84e90b9f6b87411f94618c50657e9b..afb4debc5c8561307be42e187ff001912ce001d0 100644 (file)
@@ -435,7 +435,8 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
 
 
 static int
-vgpu9_get_shader_param(struct pipe_screen *screen, unsigned shader,
+vgpu9_get_shader_param(struct pipe_screen *screen,
+                       enum pipe_shader_type shader,
                        enum pipe_shader_cap param)
 {
    struct svga_screen *svgascreen = svga_screen(screen);
@@ -590,7 +591,8 @@ vgpu9_get_shader_param(struct pipe_screen *screen, unsigned shader,
 
 
 static int
-vgpu10_get_shader_param(struct pipe_screen *screen, unsigned shader,
+vgpu10_get_shader_param(struct pipe_screen *screen,
+                        enum pipe_shader_type shader,
                         enum pipe_shader_cap param)
 {
    struct svga_screen *svgascreen = svga_screen(screen);
@@ -675,7 +677,7 @@ vgpu10_get_shader_param(struct pipe_screen *screen, unsigned shader,
 
 
 static int
-svga_get_shader_param(struct pipe_screen *screen, unsigned shader,
+svga_get_shader_param(struct pipe_screen *screen, enum pipe_shader_type shader,
                       enum pipe_shader_cap param)
 {
    struct svga_screen *svgascreen = svga_screen(screen);
index 0488a5b7683cb37df2d67bace77b752737151612..eb2288d6243dd7519de167cb3716757d425da800 100644 (file)
@@ -344,7 +344,7 @@ swr_get_param(struct pipe_screen *screen, enum pipe_cap param)
 
 static int
 swr_get_shader_param(struct pipe_screen *screen,
-                     unsigned shader,
+                     enum pipe_shader_type shader,
                      enum pipe_shader_cap param)
 {
    if (shader == PIPE_SHADER_VERTEX ||
index a44406885759f070a28d68b2179989daace0d1ba..0fa8d0f449f2a3f8486da6a92d7467d952b86b5a 100644 (file)
@@ -147,8 +147,9 @@ trace_screen_get_param(struct pipe_screen *_screen,
 
 
 static int
-trace_screen_get_shader_param(struct pipe_screen *_screen, unsigned shader,
-                       enum pipe_shader_cap param)
+trace_screen_get_shader_param(struct pipe_screen *_screen,
+                              enum pipe_shader_type shader,
+                              enum pipe_shader_cap param)
 {
    struct trace_screen *tr_scr = trace_screen(_screen);
    struct pipe_screen *screen = tr_scr->screen;
index 2a12ef8ba64900e998c8fe0a9175ebcd08061e4f..82f380f8e9b26f3cce8c5d0ce5618c70d06590ea 100644 (file)
@@ -344,8 +344,9 @@ vc4_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_capf param)
 }
 
 static int
-vc4_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
-                           enum pipe_shader_cap param)
+vc4_screen_get_shader_param(struct pipe_screen *pscreen,
+                            enum pipe_shader_type shader,
+                            enum pipe_shader_cap param)
 {
         if (shader != PIPE_SHADER_VERTEX &&
             shader != PIPE_SHADER_FRAGMENT) {
index 6e332d6bdac8abb686fade2e44886a43a01a692c..81d6790c69a139875e4c1f14c4371a97db1398ec 100644 (file)
@@ -274,7 +274,9 @@ virgl_get_param(struct pipe_screen *screen, enum pipe_cap param)
 }
 
 static int
-virgl_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param)
+virgl_get_shader_param(struct pipe_screen *screen,
+                       enum pipe_shader_type shader,
+                       enum pipe_shader_cap param)
 {
    struct virgl_screen *vscreen = virgl_screen(screen);
    switch(shader)
index eb2ac65ea4a2b3a2d55ec01676a8f082579a8583..1606c2da96ff055cc568025dacbb4ad9bd7419eb 100644 (file)
@@ -97,7 +97,8 @@ struct pipe_screen {
     * Query a per-shader-stage integer-valued capability/parameter/limit
     * \param param  one of PIPE_CAP_x
     */
-   int (*get_shader_param)( struct pipe_screen *, unsigned shader, enum pipe_shader_cap param );
+   int (*get_shader_param)( struct pipe_screen *, enum pipe_shader_type shader,
+                            enum pipe_shader_cap param );
 
    /**
     * Query an integer-valued capability/parameter/limit for a codec/profile