Enforce max sizes for glViewport.

The driver may clamp the viewport when requesting too large dimensions.
Reduce all viewports to screen size and adjust shaders in corresponding
files (only). Also switch texture in the capture test from LUMINANCE to
RGBA as we don't really care about the former.

Updating the varyings_shader references as the output changes with the
new glViewport (and no shader adjustment).

Finally this fixes a bug in triangle_setup where we were drawing only
1/4 of the triangles in the lower left corner. Now the output is
centered and made slightly larger.

BUG=chromium-os:30493
TEST=Ran GLBench and WindowManagerGraphicsCapture on Alex. Verified
     performance output is the same as on the dashboard modulo noise.

Change-Id: I716a79c8d52cd15bb1f6810b61140566e5798504
Reviewed-on: https://gerrit.chromium.org/gerrit/41848
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
29 files changed
tree: e6c906fcf13da69e6096efc75867904b254303ac
  1. glbench_knownbad_images/
  2. glbench_reference_images/
  3. README