st/mesa: don't set 16 scissors and 16 viewports if they're unused
authorMarek Olšák <marek.olsak@amd.com>
Wed, 14 Jun 2017 21:09:24 +0000 (23:09 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 21 Jun 2017 23:51:02 +0000 (01:51 +0200)
commit743ad599a97d09b119d26b99f6b79e41b567e421
tree3ccdbd3d7ea47037329bc97d8d87e247f7d77c6a
parent2ec1e32d11ed788dfed229a569a238743b9b1f9f
st/mesa: don't set 16 scissors and 16 viewports if they're unused

Only do so if there is a shader writing gl_ViewportIndex.
This removes a lot of CPU overhead for the most common case.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_atom.c
src/mesa/state_tracker/st_atom_scissor.c
src/mesa/state_tracker/st_atom_viewport.c
src/mesa/state_tracker/st_context.h