diff options
author | Nicolai Hähnle <[email protected]> | 2016-04-22 12:46:55 -0500 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-04-27 11:16:39 -0500 |
commit | d14d6c3f583d1e543945f7f4a38cfcbb823506ce (patch) | |
tree | 163f3a2c68ce1641d44ea641128b34fdab54d2ef | |
parent | 159f182a5728338cff2362a3edf2aad1dc0d35e0 (diff) |
radeonsi: use MIN2 instead of expanded ?: operator
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 2b00da98033..6db73f7cbb6 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -135,7 +135,7 @@ static void si_blit_decompress_depth(struct pipe_context *ctx, /* The smaller the mipmap level, the less layers there are * as far as 3D textures are concerned. */ max_layer = util_max_layer(&texture->resource.b.b, level); - checked_last_layer = last_layer < max_layer ? last_layer : max_layer; + checked_last_layer = MIN2(last_layer, max_layer); for (layer = first_layer; layer <= checked_last_layer; layer++) { for (sample = first_sample; sample <= last_sample; sample++) { @@ -209,7 +209,7 @@ static void si_blit_decompress_depth_in_place(struct si_context *sctx, /* The smaller the mipmap level, the less layers there are * as far as 3D textures are concerned. */ max_layer = util_max_layer(&texture->resource.b.b, level); - checked_last_layer = last_layer < max_layer ? last_layer : max_layer; + checked_last_layer = MIN2(last_layer, max_layer); for (layer = first_layer; layer <= checked_last_layer; layer++) { surf_tmpl.u.tex.first_layer = layer; @@ -295,7 +295,7 @@ static void si_blit_decompress_color(struct pipe_context *ctx, /* The smaller the mipmap level, the less layers there are * as far as 3D textures are concerned. */ max_layer = util_max_layer(&rtex->resource.b.b, level); - checked_last_layer = last_layer < max_layer ? last_layer : max_layer; + checked_last_layer = MIN2(last_layer, max_layer); for (layer = first_layer; layer <= checked_last_layer; layer++) { struct pipe_surface *cbsurf, surf_tmpl; |