summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2017-11-16 16:09:34 +0100
committerBrian Paul <[email protected]>2017-11-17 09:27:56 -0700
commitca7d5170eb7660e86dfddcc1fa2d359d12b78ef6 (patch)
treecb403e9e1ef038785b4600a1104614832e274b29 /src/gallium
parentc267750bb14f67126bd2a0caa9ec7bb3156d061e (diff)
gallium/aux/util/u_blitter.c: Silence some warnings
* Annotate three parameters that are not used in release mode. * explicitely convert an int to unsigned in an ?: construct. v2: move MAYBE_UNUSED decoration in front of parameter declaration Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 72e22e7d826..476ef08737e 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -550,7 +550,7 @@ void util_blitter_unset_running_flag(struct blitter_context *blitter)
blitter->pipe->set_active_query_state(blitter->pipe, true);
}
-static void blitter_check_saved_vertex_states(struct blitter_context_priv *ctx)
+static void blitter_check_saved_vertex_states(MAYBE_UNUSED struct blitter_context_priv *ctx)
{
assert(ctx->base.saved_vs != INVALID_PTR);
assert(!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR);
@@ -616,7 +616,7 @@ void util_blitter_restore_vertex_states(struct blitter_context *blitter)
ctx->base.saved_rs_state = INVALID_PTR;
}
-static void blitter_check_saved_fragment_states(struct blitter_context_priv *ctx)
+static void blitter_check_saved_fragment_states(MAYBE_UNUSED struct blitter_context_priv *ctx)
{
assert(ctx->base.saved_fs != INVALID_PTR);
assert(ctx->base.saved_dsa_state != INVALID_PTR);
@@ -655,7 +655,7 @@ void util_blitter_restore_fragment_states(struct blitter_context *blitter)
pipe->set_viewport_states(pipe, 0, 1, &ctx->base.saved_viewport);
}
-static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx)
+static void blitter_check_saved_fb_state(MAYBE_UNUSED struct blitter_context_priv *ctx)
{
assert(ctx->base.saved_fb_state.nr_cbufs != ~0u);
}
@@ -691,7 +691,7 @@ void util_blitter_restore_fb_state(struct blitter_context *blitter)
util_unreference_framebuffer_state(&ctx->base.saved_fb_state);
}
-static void blitter_check_saved_textures(struct blitter_context_priv *ctx)
+static void blitter_check_saved_textures(MAYBE_UNUSED struct blitter_context_priv *ctx)
{
assert(ctx->base.saved_num_sampler_states != ~0u);
assert(ctx->base.saved_num_sampler_views != ~0u);
@@ -1488,7 +1488,7 @@ void util_blitter_default_src_texture(struct blitter_context *blitter,
src_templ->u.tex.first_layer = 0;
src_templ->u.tex.last_layer =
src->target == PIPE_TEXTURE_3D ? u_minify(src->depth0, srclevel) - 1
- : src->array_size - 1;
+ : (unsigned)(src->array_size - 1);
src_templ->swizzle_r = PIPE_SWIZZLE_X;
src_templ->swizzle_g = PIPE_SWIZZLE_Y;
src_templ->swizzle_b = PIPE_SWIZZLE_Z;