diff options
author | Brian Paul <[email protected]> | 2017-03-05 12:13:02 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-03-08 08:50:20 -0700 |
commit | 637e5719b5dacbf96cc902deecb187be52495a3e (patch) | |
tree | 29158bcc18968fc23e9d4a9d61d71b526536f2ed /src/gallium | |
parent | db5f9c31774691df9239bcbbbf52075a63c08c25 (diff) |
gallium: s/unsigned/enum pipe_shader_type/ for pipe_screen::get_shader_param()
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/gallium')
23 files changed, 62 insertions, 29 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 56abcff5a24..46dd0b4128f 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -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 diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h index 145fc2ed467..e605cd6a5fb 100644 --- a/src/gallium/auxiliary/draw/draw_context.h +++ b/src/gallium/auxiliary/draw/draw_context.h @@ -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); diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index b7b83135838..6bc5e6660f9 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -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) { diff --git a/src/gallium/drivers/ddebug/dd_screen.c b/src/gallium/drivers/ddebug/dd_screen.c index 0e8bd48fe61..9642532bc02 100644 --- a/src/gallium/drivers/ddebug/dd_screen.c +++ b/src/gallium/drivers/ddebug/dd_screen.c @@ -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; diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index ab436b969c9..0cd2737deb6 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -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); diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 4a461fd511c..db6b8a43fc5 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -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); diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 28703b89edf..62643f7c64f 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -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: diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 4bc202c497e..e0fe637cf41 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -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) { diff --git a/src/gallium/drivers/noop/noop_pipe.c b/src/gallium/drivers/noop/noop_pipe.c index db2375e2e5d..d1e795dab16 100644 --- a/src/gallium/drivers/noop/noop_pipe.c +++ b/src/gallium/drivers/noop/noop_pipe.c @@ -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; diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index bc31810cad9..414a5c8f6c3 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -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); diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 83f67cac6c1..29a4d9de192 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -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) { diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 643eb4305f8..b7ce13a3c4d 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -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; diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 9a2400df935..624015c2e0a 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -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; } diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 68c4cccdf5f..49aab6b7fb8 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -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; diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 1550326f8ed..300615f6a93 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -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; diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c index 7505dd750a5..b12f029b3ea 100644 --- a/src/gallium/drivers/rbug/rbug_screen.c +++ b/src/gallium/drivers/rbug/rbug_screen.c @@ -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; diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 8cd1873ce2d..7ed13a570f7 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -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) diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 72c142d6cf8..afb4debc5c8 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -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); diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index 0488a5b7683..eb2288d6243 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -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 || diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index a4440688575..0fa8d0f449f 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -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; diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 2a12ef8ba64..82f380f8e9b 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -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) { diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 6e332d6bdac..81d6790c69a 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -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) diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index eb2ac65ea4a..1606c2da96f 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -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 |