mesa: clamp viewport values only once when using glViewport()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 28 Jul 2017 13:47:22 +0000 (15:47 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 31 Jul 2017 10:14:10 +0000 (12:14 +0200)
commitddc32537d6db69198e88ef0dfe19770bf9daa536
tree4c50fa62af65453d3f2396fa88e06de2cf7f9285
parent58473f8b8782dbdcc59b65d6c8e936d595c8a628
mesa: clamp viewport values only once when using glViewport()

It's useless to clamp the same values for all viewports.

+7% in the "viewport change" test (drawoverhead benchmark).

v2: - call clamp_viewport() in all callers of set_viewport_no_notify()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (v1)
src/mesa/main/viewport.c