summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c2
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.h2
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_context.h4
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aaline.c3
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_pstipple.c9
-rw-r--r--src/gallium/drivers/ddebug/dd_context.c3
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_texture.c2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_texture.c2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_texture.h3
-rw-r--r--src/gallium/drivers/i915/i915_state.c2
-rw-r--r--src/gallium/drivers/ilo/ilo_state.c5
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_sampler.c2
-rw-r--r--src/gallium/drivers/noop/noop_state.c3
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_fragtex.c2
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_state.c2
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_state.c2
-rw-r--r--src/gallium/drivers/r300/r300_state.c3
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c3
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c2
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_state.h2
-rw-r--r--src/gallium/drivers/softpipe/sp_state_sampler.c2
-rw-r--r--src/gallium/drivers/svga/svga_pipe_sampler.c2
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp2
-rw-r--r--src/gallium/drivers/trace/tr_context.c2
-rw-r--r--src/gallium/drivers/vc4/vc4_state.c5
-rw-r--r--src/gallium/drivers/virgl/virgl_context.c2
-rw-r--r--src/gallium/include/pipe/p_context.h3
29 files changed, 47 insertions, 35 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 6ffcce4dc6e..5e6b36e9b53 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1284,7 +1284,7 @@ cso_restore_fragment_samplers(struct cso_context *ctx)
void
cso_set_sampler_views(struct cso_context *ctx,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
unsigned count,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index 5c9cb5a6327..27863f4a642 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -188,7 +188,7 @@ void cso_restore_state(struct cso_context *cso);
void
cso_set_sampler_views(struct cso_context *cso,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
unsigned count,
struct pipe_sampler_view **views);
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 6305761f2db..56abcff5a24 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -964,7 +964,7 @@ draw_set_mapped_so_targets(struct draw_context *draw,
void
draw_set_sampler_views(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_view **views,
unsigned num)
{
@@ -985,7 +985,7 @@ draw_set_sampler_views(struct draw_context *draw,
void
draw_set_samplers(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_state **samplers,
unsigned num)
{
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index 9167ffde753..145fc2ed467 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -167,12 +167,12 @@ draw_buffer(struct draw_context *draw,
void
draw_set_sampler_views(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_view **views,
unsigned num);
void
draw_set_samplers(struct draw_context *draw,
- unsigned shader_stage,
+ enum pipe_shader_type shader_stage,
struct pipe_sampler_state **samplers,
unsigned num);
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
index 1ea77da90e1..c236caa3edd 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
@@ -910,7 +910,8 @@ aaline_bind_sampler_states(struct pipe_context *pipe,
static void
-aaline_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+aaline_set_sampler_views(struct pipe_context *pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index ed94083f06e..33bd7b6cfd5 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -104,8 +104,8 @@ struct pstip_stage
unsigned, unsigned, void **);
void (*driver_set_sampler_views)(struct pipe_context *,
- unsigned shader, unsigned start,
- unsigned count,
+ enum pipe_shader_type shader,
+ unsigned start, unsigned count,
struct pipe_sampler_view **);
void (*driver_set_polygon_stipple)(struct pipe_context *,
@@ -143,7 +143,7 @@ generate_pstip_fs(struct pstip_stage *pstip)
assert(pstip->fs->sampler_unit < PIPE_MAX_SAMPLERS);
pstip->fs->pstip_fs = pstip->driver_create_fs_state(pipe, &pstip_fs);
-
+
FREE((void *)pstip_fs.tokens);
if (!pstip->fs->pstip_fs)
@@ -399,7 +399,8 @@ pstip_bind_sampler_states(struct pipe_context *pipe,
static void
pstip_set_sampler_views(struct pipe_context *pipe,
- unsigned shader, unsigned start, unsigned num,
+ enum pipe_shader_type shader,
+ unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
struct pstip_stage *pstip = pstip_stage_from_pipe(pipe);
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index 25c6b5f75a6..50edfd794e3 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -507,7 +507,8 @@ dd_context_stream_output_target_destroy(struct pipe_context *_pipe,
*/
static void
-dd_context_set_sampler_views(struct pipe_context *_pipe, unsigned shader,
+dd_context_set_sampler_views(struct pipe_context *_pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
index bad56fec83b..4faeceee5e6 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
@@ -308,7 +308,7 @@ fd4_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
}
static void
-fd4_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+fd4_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c
index 884d7b04811..2d038927a5a 100644
--- a/src/gallium/drivers/freedreno/freedreno_texture.c
+++ b/src/gallium/drivers/freedreno/freedreno_texture.c
@@ -102,7 +102,7 @@ fd_sampler_states_bind(struct pipe_context *pctx,
}
void
-fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+fd_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.h b/src/gallium/drivers/freedreno/freedreno_texture.h
index b52e27d07a0..61245329967 100644
--- a/src/gallium/drivers/freedreno/freedreno_texture.h
+++ b/src/gallium/drivers/freedreno/freedreno_texture.h
@@ -35,7 +35,8 @@ void fd_sampler_states_bind(struct pipe_context *pctx,
unsigned shader, unsigned start,
unsigned nr, void **hwcso);
-void fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+void fd_set_sampler_views(struct pipe_context *pctx,
+ enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views);
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index 0290c0fd33e..950604407e9 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -794,7 +794,7 @@ i915_set_vertex_sampler_views(struct pipe_context *pipe,
static void
-i915_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+i915_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned num,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c
index e05d49f7bf4..0ae32c76161 100644
--- a/src/gallium/drivers/ilo/ilo_state.c
+++ b/src/gallium/drivers/ilo/ilo_state.c
@@ -1802,7 +1802,7 @@ ilo_set_viewport_states(struct pipe_context *pipe,
}
static void
-ilo_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+ilo_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view **views)
{
@@ -1846,6 +1846,9 @@ ilo_set_sampler_views(struct pipe_context *pipe, unsigned shader,
case PIPE_SHADER_COMPUTE:
vec->dirty |= ILO_DIRTY_VIEW_CS;
break;
+ default:
+ assert(!"unexpected shader type");
+ break;
}
}
diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index 6dd520f65e7..01af0521146 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -106,7 +106,7 @@ llvmpipe_bind_sampler_states(struct pipe_context *pipe,
static void
llvmpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
diff --git a/src/gallium/drivers/noop/noop_state.c b/src/gallium/drivers/noop/noop_state.c
index ed964ddaf92..4f63e4d8959 100644
--- a/src/gallium/drivers/noop/noop_state.c
+++ b/src/gallium/drivers/noop/noop_state.c
@@ -124,7 +124,8 @@ static struct pipe_surface *noop_create_surface(struct pipe_context *ctx,
return surface;
}
-static void noop_set_sampler_views(struct pipe_context *ctx, unsigned shader,
+static void noop_set_sampler_views(struct pipe_context *ctx,
+ enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c
index 4ab31d14169..a6bfee6f0bb 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_fragtex.c
@@ -196,7 +196,7 @@ nv30_fragtex_set_sampler_views(struct pipe_context *pipe, unsigned nr,
static void
-nv30_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+nv30_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c
index 86674673e92..57b23e6af5c 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_state.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c
@@ -712,7 +712,7 @@ nv50_stage_set_sampler_views(struct nv50_context *nv50, int s,
}
static void
-nv50_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+nv50_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
index 0d971f3f2e4..c9b0e3fcf43 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
@@ -656,7 +656,7 @@ nvc0_stage_set_sampler_views_range(struct nvc0_context *nvc0, const unsigned s,
}
static void
-nvc0_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+nvc0_set_sampler_views(struct pipe_context *pipe, enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 7c1aed8ff80..196c0df8864 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -1522,7 +1522,8 @@ static uint32_t r300_assign_texture_cache_region(unsigned index, unsigned num)
return R300_TX_CACHE(num + index);
}
-static void r300_set_sampler_views(struct pipe_context* pipe, unsigned shader,
+static void r300_set_sampler_views(struct pipe_context* pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view** views)
{
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index fd8eb95af3a..5234c044b67 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -597,7 +597,8 @@ void r600_sampler_views_dirty(struct r600_context *rctx,
}
}
-static void r600_set_sampler_views(struct pipe_context *pipe, unsigned shader,
+static void r600_set_sampler_views(struct pipe_context *pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned count,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 075d0823e8d..573c8a85817 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -465,7 +465,7 @@ static bool is_compressed_colortex(struct r600_texture *rtex)
}
static void si_set_sampler_views(struct pipe_context *ctx,
- unsigned shader, unsigned start,
+ enum pipe_shader_type shader, unsigned start,
unsigned count,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index e8782414530..b08acfaf8c1 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -727,7 +727,7 @@ rbug_set_viewport_states(struct pipe_context *_pipe,
static void
rbug_set_sampler_views(struct pipe_context *_pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **_views)
diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h
index 0ced70c305d..af6b9782afa 100644
--- a/src/gallium/drivers/softpipe/sp_state.h
+++ b/src/gallium/drivers/softpipe/sp_state.h
@@ -172,7 +172,7 @@ softpipe_update_derived(struct softpipe_context *softpipe, unsigned prim);
void
softpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views);
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c
index 6454f6bcd1b..a4185c2b641 100644
--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -97,7 +97,7 @@ softpipe_sampler_view_destroy(struct pipe_context *pipe,
void
softpipe_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c
index db598799ac7..4a2b3c3ef72 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -417,7 +417,7 @@ svga_sampler_view_destroy(struct pipe_context *pipe,
static void
svga_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index f9d8ea84ee3..7d49ce7b896 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -282,7 +282,7 @@ swr_create_sampler_view(struct pipe_context *pipe,
static void
swr_set_sampler_views(struct pipe_context *pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 7d3329e768f..a648297fa9b 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1016,7 +1016,7 @@ trace_context_surface_destroy(struct pipe_context *_pipe,
static void
trace_context_set_sampler_views(struct pipe_context *_pipe,
- unsigned shader,
+ enum pipe_shader_type shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c
index 5706765c2eb..bf211b1b02a 100644
--- a/src/gallium/drivers/vc4/vc4_state.c
+++ b/src/gallium/drivers/vc4/vc4_state.c
@@ -480,7 +480,7 @@ vc4_set_framebuffer_state(struct pipe_context *pctx,
}
static struct vc4_texture_stateobj *
-vc4_get_stage_tex(struct vc4_context *vc4, unsigned shader)
+vc4_get_stage_tex(struct vc4_context *vc4, enum pipe_shader_type shader)
{
switch (shader) {
case PIPE_SHADER_FRAGMENT:
@@ -660,7 +660,8 @@ vc4_sampler_view_destroy(struct pipe_context *pctx,
}
static void
-vc4_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+vc4_set_sampler_views(struct pipe_context *pctx,
+ enum pipe_shader_type shader,
unsigned start, unsigned nr,
struct pipe_sampler_view **views)
{
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c
index 625baf99af9..1bd7f3b6b52 100644
--- a/src/gallium/drivers/virgl/virgl_context.c
+++ b/src/gallium/drivers/virgl/virgl_context.c
@@ -690,7 +690,7 @@ static struct pipe_sampler_view *virgl_create_sampler_view(struct pipe_context *
}
static void virgl_set_sampler_views(struct pipe_context *ctx,
- unsigned shader_type,
+ enum pipe_shader_type shader_type,
unsigned start_slot,
unsigned num_views,
struct pipe_sampler_view **views)
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 9c9a126ad01..b74679d1f82 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -285,7 +285,8 @@ struct pipe_context {
unsigned num_viewports,
const struct pipe_viewport_state *);
- void (*set_sampler_views)(struct pipe_context *, unsigned shader,
+ void (*set_sampler_views)(struct pipe_context *,
+ enum pipe_shader_type shader,
unsigned start_slot, unsigned num_views,
struct pipe_sampler_view **);