summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-27 20:28:09 -0700
committerBrian Paul <[email protected]>2012-02-29 08:39:20 -0700
commit9e68a8fa728c5d737a8b0c66aba066afddd67e9a (patch)
tree8f60b6f437d016b723f9eb67756f06e70aef1d33 /src/gallium
parent84870e215667c999202be31057df6e31a0389bb7 (diff)
util: fix assertions in u_blitter.c code
Assertions of the form assert(a && b) should be written as separate assertions so that you can actually tell which part is false when there's a failure. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 48808ae084d..5784a7ceb8f 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -351,12 +351,12 @@ static void blitter_unset_running_flag(struct blitter_context_priv *ctx)
static void blitter_check_saved_vertex_states(struct blitter_context_priv *ctx)
{
- assert(ctx->base.saved_num_vertex_buffers != ~0 &&
- ctx->base.saved_velem_state != INVALID_PTR &&
- ctx->base.saved_vs != INVALID_PTR &&
- (!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR) &&
- (!ctx->has_stream_out || ctx->base.saved_num_so_targets != ~0) &&
- ctx->base.saved_rs_state != INVALID_PTR);
+ assert(ctx->base.saved_num_vertex_buffers != ~0);
+ assert(ctx->base.saved_velem_state != INVALID_PTR);
+ assert(ctx->base.saved_vs != INVALID_PTR);
+ assert(!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR);
+ assert(!ctx->has_stream_out || ctx->base.saved_num_so_targets != ~0);
+ assert(ctx->base.saved_rs_state != INVALID_PTR);
}
static void blitter_restore_vertex_states(struct blitter_context_priv *ctx)
@@ -410,9 +410,9 @@ static void blitter_restore_vertex_states(struct blitter_context_priv *ctx)
static void blitter_check_saved_fragment_states(struct blitter_context_priv *ctx)
{
- assert(ctx->base.saved_fs != INVALID_PTR &&
- ctx->base.saved_dsa_state != INVALID_PTR &&
- ctx->base.saved_blend_state != INVALID_PTR);
+ assert(ctx->base.saved_fs != INVALID_PTR);
+ assert(ctx->base.saved_dsa_state != INVALID_PTR);
+ assert(ctx->base.saved_blend_state != INVALID_PTR);
}
static void blitter_restore_fragment_states(struct blitter_context_priv *ctx)
@@ -453,8 +453,8 @@ static void blitter_restore_fb_state(struct blitter_context_priv *ctx)
static void blitter_check_saved_textures(struct blitter_context_priv *ctx)
{
- assert(ctx->base.saved_num_sampler_states != ~0 &&
- ctx->base.saved_num_sampler_views != ~0);
+ assert(ctx->base.saved_num_sampler_states != ~0);
+ assert(ctx->base.saved_num_sampler_views != ~0);
}
static void blitter_restore_textures(struct blitter_context_priv *ctx)