mesa: don't clamp just based on ARB_viewport_array extension
authorGurchetan Singh <gurchetansingh@chromium.org>
Wed, 14 Feb 2018 23:40:35 +0000 (15:40 -0800)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 15 Feb 2018 00:58:50 +0000 (01:58 +0100)
commitc6694793e1148f920a94eb54db11cead1662c2da
tree1b55e3eee37f40652d242c079d7b398869182a47
parent5317211fa029ee8d0e1c802ef8c01f64c470e3d5
mesa: don't clamp just based on ARB_viewport_array extension

The ARB_viewport_array spec says:

"Dependencies
    OpenGL 1.0 is required.

    OpenGL 3.2 or the EXT_geometry_shader4 or ARB_geometry_shader4 extensions
    are required.

    This extension is written against the OpenGL 3.2 (Compatibility)
    Specification."

As such, we should ignore it for GLES2 contexts.

Fixes:
dEQP-GLES2.functional.state_query.integers.viewport_getinteger
dEQP-GLES2.functional.state_query.integers.viewport_getfloat

on llvmpipe and virgl.

v2: Use _mesa_has_* (Ilia)

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Cc: 17.3 18.0 <mesa-stable@lists.freedesktop.org>
src/mesa/main/viewport.c