[Mesa-dev] [PATCH 01/14] gallium: s/unsigned/enum pipe_shader_type/ for pipe_screen::get_shader_param()
Brian Paul
brianp at vmware.com
Tue Mar 7 02:08:04 UTC 2017
---
src/gallium/auxiliary/draw/draw_context.c | 5 +++--
src/gallium/auxiliary/draw/draw_context.h | 5 +++--
src/gallium/auxiliary/util/u_inlines.h | 3 ++-
src/gallium/drivers/ddebug/dd_screen.c | 3 ++-
src/gallium/drivers/etnaviv/etnaviv_screen.c | 3 ++-
src/gallium/drivers/freedreno/freedreno_screen.c | 3 ++-
src/gallium/drivers/i915/i915_screen.c | 4 +++-
src/gallium/drivers/llvmpipe/lp_screen.c | 4 +++-
src/gallium/drivers/noop/noop_pipe.c | 4 +++-
src/gallium/drivers/nouveau/nv30/nv30_screen.c | 3 ++-
src/gallium/drivers/nouveau/nv50/nv50_screen.c | 3 ++-
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 ++-
src/gallium/drivers/r300/r300_screen.c | 6 +++++-
src/gallium/drivers/r600/r600_pipe.c | 4 +++-
src/gallium/drivers/radeonsi/si_pipe.c | 4 +++-
src/gallium/drivers/rbug/rbug_screen.c | 3 ++-
src/gallium/drivers/softpipe/sp_screen.c | 4 +++-
src/gallium/drivers/svga/svga_screen.c | 8 +++++---
src/gallium/drivers/swr/swr_screen.cpp | 2 +-
src/gallium/drivers/trace/tr_screen.c | 5 +++--
src/gallium/drivers/vc4/vc4_screen.c | 5 +++--
src/gallium/drivers/virgl/virgl_screen.c | 4 +++-
src/gallium/include/pipe/p_screen.h | 3 ++-
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 56abcff..46dd0b4 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 145fc2e..e605cd6 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 b7b8313..6bc5e66 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 0e8bd48..9642532 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 ab436b9..0cd2737 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 e667187..730b9b0 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 28703b8..62643f7 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 1c94b6e..d096e10 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 db2375e..d1e795d 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 bc31810..414a5c8 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 83f67ca..29a4d9d 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 643eb43..b7ce13a 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 903502d..dfb1199 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 68c4ccc..49aab6b 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 d04abb6..305c2f1 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 3ed9090..d2a7951 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 8cd1873..7ed13a5 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 90f8e2b..55a993d 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 0488a5b..eb2288d 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 a444068..0fa8d0f 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 31ab0db..3a65a06 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 6e332d6..81d6790 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 eb2ac65..1606c2d 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
--
1.9.1
More information about the mesa-dev
mailing list