summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0
diff options
context:
space:
mode:
authorKai Wasserbäch <[email protected]>2016-08-27 04:08:00 -0600
committerBrian Paul <[email protected]>2016-08-29 08:45:48 -0600
commit7413625ad357c87f409cd1673b40f8dffbc43259 (patch)
tree238163910ff8f8b3abfc45350618e7eecf3c55ea /src/gallium/drivers/nouveau/nvc0
parented24d79ed712f22ca12a1986a024c522d202dc37 (diff)
gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)
v1 → v2: - Fixed indentation (noted by Brian Paul) - Removed second assert from nouveau's switch statements (suggested by Brian Paul) Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_state.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
index b9ac9f49ad9..0d971f3f2e4 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
@@ -426,7 +426,8 @@ nvc0_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
}
static inline void
-nvc0_stage_sampler_states_bind(struct nvc0_context *nvc0, int s,
+nvc0_stage_sampler_states_bind(struct nvc0_context *nvc0,
+ enum pipe_shader_type s,
unsigned nr, void **hwcso)
{
unsigned i;
@@ -456,7 +457,7 @@ nvc0_stage_sampler_states_bind(struct nvc0_context *nvc0, int s,
static void
nvc0_stage_sampler_states_bind_range(struct nvc0_context *nvc0,
- const unsigned s,
+ const enum pipe_shader_type s,
unsigned start, unsigned nr, void **cso)
{
const unsigned end = start + nr;
@@ -497,7 +498,8 @@ nvc0_stage_sampler_states_bind_range(struct nvc0_context *nvc0,
}
static void
-nvc0_bind_sampler_states(struct pipe_context *pipe, unsigned shader,
+nvc0_bind_sampler_states(struct pipe_context *pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned nr, void **s)
{
switch (shader) {
@@ -526,6 +528,9 @@ nvc0_bind_sampler_states(struct pipe_context *pipe, unsigned shader,
start, nr, s);
nvc0_context(pipe)->dirty_cp |= NVC0_NEW_CP_SAMPLERS;
break;
+ default:
+ assert(!"unexpected shader type");
+ break;
}
}