diff options
author | Kai Wasserbäch <[email protected]> | 2016-08-27 04:08:00 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-08-29 08:45:48 -0600 |
commit | 7413625ad357c87f409cd1673b40f8dffbc43259 (patch) | |
tree | 238163910ff8f8b3abfc45350618e7eecf3c55ea /src/gallium/auxiliary/cso_cache | |
parent | ed24d79ed712f22ca12a1986a024c522d202dc37 (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/auxiliary/cso_cache')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 4a54cff97a1..6ffcce4dc6e 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -316,7 +316,7 @@ void cso_destroy_context( struct cso_context *ctx ) static struct pipe_sampler_view *views[PIPE_MAX_SHADER_SAMPLER_VIEWS] = { NULL }; static void *zeros[PIPE_MAX_SAMPLERS] = { NULL }; struct pipe_screen *scr = ctx->pipe->screen; - unsigned sh; + enum pipe_shader_type sh; for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) { int maxsam = scr->get_shader_param(scr, sh, PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS); @@ -1207,7 +1207,8 @@ cso_single_sampler(struct cso_context *ctx, unsigned shader_stage, * Send staged sampler state to the driver. */ void -cso_single_sampler_done(struct cso_context *ctx, unsigned shader_stage) +cso_single_sampler_done(struct cso_context *ctx, + enum pipe_shader_type shader_stage) { struct sampler_info *info = &ctx->samplers[shader_stage]; const unsigned old_nr_samplers = info->nr_samplers; @@ -1233,7 +1234,7 @@ cso_single_sampler_done(struct cso_context *ctx, unsigned shader_stage) */ enum pipe_error cso_set_samplers(struct cso_context *ctx, - unsigned shader_stage, + enum pipe_shader_type shader_stage, unsigned nr, const struct pipe_sampler_state **templates) { diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h index a4309c7684c..5c9cb5a6327 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.h +++ b/src/gallium/auxiliary/cso_cache/cso_context.h @@ -60,7 +60,7 @@ enum pipe_error cso_set_rasterizer( struct cso_context *cso, enum pipe_error cso_set_samplers(struct cso_context *cso, - unsigned shader_stage, + enum pipe_shader_type shader_stage, unsigned count, const struct pipe_sampler_state **states); @@ -73,7 +73,8 @@ cso_single_sampler(struct cso_context *cso, unsigned shader_stage, unsigned idx, const struct pipe_sampler_state *states); void -cso_single_sampler_done(struct cso_context *cso, unsigned shader_stage); +cso_single_sampler_done(struct cso_context *cso, + enum pipe_shader_type shader_stage); enum pipe_error cso_set_vertex_elements(struct cso_context *ctx, |