From 5a59211acd128c4ced0f7e33ab2e2eb088bc9342 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 8 Jul 2022 08:02:24 -0700 Subject: [PATCH] dzn: Use fabs on floating point input Reviewed-by: Boris Brezillon Part-of: --- src/microsoft/vulkan/dzn_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsoft/vulkan/dzn_util.c b/src/microsoft/vulkan/dzn_util.c index 7f9dac363ce..5c7750d9ac9 100644 --- a/src/microsoft/vulkan/dzn_util.c +++ b/src/microsoft/vulkan/dzn_util.c @@ -281,7 +281,7 @@ dzn_translate_viewport(D3D12_VIEWPORT *out, out->TopLeftX = in->x; out->TopLeftY = in->height < 0 ? in->height + in->y : in->y; out->Width = in->width; - out->Height = abs(in->height); + out->Height = fabs(in->height); out->MinDepth = MIN2(in->minDepth, in->maxDepth); out->MaxDepth = MAX2(in->maxDepth, in->minDepth); }