radv: Don't take absolute value of unsigned type.
authorOschowa <oschowa@web.de>
Fri, 22 May 2020 10:37:27 +0000 (12:37 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Jun 2020 21:31:17 +0000 (21:31 +0000)
Fixes clang warnings.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>

src/amd/vulkan/radv_meta_blit.c

index b7a9205085e428280ab325fb37f50b4a65cddeff..cf43b2fc41b640aed953aaa2c30ebd980a6b4940 100644 (file)
@@ -620,8 +620,8 @@ void radv_CmdBlitImage(
                VkRect2D dest_box;
                dest_box.offset.x = MIN2(dst_x0, dst_x1);
                dest_box.offset.y = MIN2(dst_y0, dst_y1);
-               dest_box.extent.width = abs(dst_x1 - dst_x0);
-               dest_box.extent.height = abs(dst_y1 - dst_y0);
+               dest_box.extent.width = dst_x1 - dst_x0;
+               dest_box.extent.height = dst_y1 - dst_y0;
 
                const unsigned num_layers = dst_end - dst_start;
                for (unsigned i = 0; i < num_layers; i++) {