i965: Use brw_get_line_width() in Gen4-5 SF_STATE code.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 10 May 2017 09:41:43 +0000 (02:41 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 14 Jun 2017 22:56:21 +0000 (15:56 -0700)
commit6563d5287b2f188d12ec63b8356075f9b1c78309
tree54e6587b6ea8460ada3b8c8dfa01fba067ac226e
parentaf373ea4a27f938f5100579046cac7e5d2bbf790
i965: Use brw_get_line_width() in Gen4-5 SF_STATE code.

This unifies the Gen4-5 and Gen6+ line width calculations.

I believe it also fixes a bug - we weren't rounding the line width
to the nearest integer.  The GL 4.5 (and GL 2.1) specs "Wide Lines"
section says:

"The actual width of non-antialiased lines is determined by rounding
 the supplied width to the nearest integer, then clamping it to the
 implementation-dependent maximum non-antialiased line width."

We don't need to care about _NEW_MULTISAMPLE here because multisampling
doesn't exist on Gen4-5, so the state shouldn't change.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/mesa/drivers/dri/i965/brw_sf_state.c