diff options
author | Eric Engestrom <eric.engestrom@intel.com> | 2018-10-18 15:51:47 +0100 |
---|---|---|
committer | Eric Engestrom <eric.engestrom@intel.com> | 2018-10-23 11:43:51 +0100 |
commit | 17b03b532022d4042fb2170b38dc28f5ff22bb8a (patch) | |
tree | ad91cc9420f8be6dd152ad52422bd74a05abe295 /src | |
parent | 8629d807aae1319843e52618b82d9a0a1ae584e8 (diff) |
radv: s/abs/fabsf/ for floats
Fixes: a4c4efad89eceb26cf82 "radv: Rework guard band calculation"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/si_cmd_buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index de057657ee7..52daf994147 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -516,16 +516,16 @@ si_write_scissors(struct radeon_cmdbuf *cs, int first, VkRect2D scissor = si_intersect_scissor(&scissors[i], &viewport_scissor); get_viewport_xform(viewports + i, scale, translate); - scale[0] = abs(scale[0]); - scale[1] = abs(scale[1]); + scale[0] = fabsf(scale[0]); + scale[1] = fabsf(scale[1]); if (scale[0] < 0.5) scale[0] = 0.5; if (scale[1] < 0.5) scale[1] = 0.5; - guardband_x = MIN2(guardband_x, (max_range - abs(translate[0])) / scale[0]); - guardband_y = MIN2(guardband_y, (max_range - abs(translate[1])) / scale[1]); + guardband_x = MIN2(guardband_x, (max_range - fabsf(translate[0])) / scale[0]); + guardband_y = MIN2(guardband_y, (max_range - fabsf(translate[1])) / scale[1]); radeon_emit(cs, S_028250_TL_X(scissor.offset.x) | S_028250_TL_Y(scissor.offset.y) | |