dzn: Use fabs on floating point input

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17423>
This commit is contained in:
Jesse Natalie 2022-07-08 08:02:24 -07:00 committed by Marge Bot
parent 2ace7832f9
commit 5a59211acd
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}