st/mesa: disable line stippling if pattern is all 1's
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 10 Dec 2020 17:50:50 +0000 (18:50 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 16 Dec 2020 09:33:06 +0000 (09:33 +0000)
commit296316b5dec2d3512408859c38f50dd308a75bbc
treee36839ba0d20087b35d4c9efc75bc1b10ec62132
parent967ae12931e0dc12855de903851222b2f0607878
st/mesa: disable line stippling if pattern is all 1's

The spec says:
  When disabled, it is as if theline stipple has its default value
(the default value being all 1's)

So treat pattern=0xffff as line stippling = off.

This improves performance in specviewperf13 snx lines tests.
For instance in the last test I get:
  * master: 260 fps, gpu-load: ~92%
  * with this commit: 280 fps, gpu-load: ~72%

(both tested with d60930c017 reverted)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8105>
src/mesa/state_tracker/st_atom_rasterizer.c