zink: fix line-width calculation
authorDuncan Hopkins <duncan@thefoundry.co.uk>
Wed, 10 Jul 2019 13:50:16 +0000 (14:50 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:48 +0000 (08:51 +0000)
commit108ba81c959021ba894553b2c409593c7c51b7bd
tree5b4f78b1b55fbd3b8bf5d5f6b87fc3c1693df045
parentdf11f3f2ab270c3801762b28cf6854a82639a934
zink: fix line-width calculation

There's two things that goes wrong in this code on some drivers:
1. Rounding off the line-width to granularity can push it outside the
   legal range.
2. A granularity of 0.0 results in NaN, because we divide by zero.

So let's make this code a bit more robust.

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/zink_state.c