lima: increase epsilon for depthrange near == far
authorErico Nunes <nunes.erico@gmail.com>
Sun, 28 Mar 2021 21:42:43 +0000 (23:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 12 Apr 2021 21:08:35 +0000 (21:08 +0000)
commitb071d98c0432eebf3318e8d7a1eb904e3c735d14
tree50507425d221c62e5c5b5f3764642e1f4d2a2c81
parentfaf10bd49d385d02dcad524c02151674b7c6d7ce
lima: increase epsilon for depthrange near == far

When the application sets depthrange near == far, lima inserts an
'epsilon' difference of decreasing 'near' by 1 unit, to prevent
application bugs.
For some specific values of depthrange this does not seem to be
sufficient, presumably due to precision limitations.
Increase the difference by also incrementing the 'far' distance in
this case, to further avoid bugs.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9933>
src/gallium/drivers/lima/lima_draw.c