summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/viewport.c
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2018-02-14 15:40:35 -0800
committerMarek Olšák <[email protected]>2018-02-15 01:58:50 +0100
commitc6694793e1148f920a94eb54db11cead1662c2da (patch)
tree1b55e3eee37f40652d242c079d7b398869182a47 /src/mesa/main/viewport.c
parent5317211fa029ee8d0e1c802ef8c01f64c470e3d5 (diff)
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 <[email protected]> Cc: 17.3 18.0 <[email protected]>
Diffstat (limited to 'src/mesa/main/viewport.c')
-rw-r--r--src/mesa/main/viewport.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index fc384909e63..398cc636856 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -51,9 +51,8 @@ clamp_viewport(struct gl_context *ctx, GLfloat *x, GLfloat *y,
* determined by calling GetFloatv with the symbolic constant
* VIEWPORT_BOUNDS_RANGE (see section 6.1)."
*/
- if (ctx->Extensions.ARB_viewport_array ||
- (ctx->Extensions.OES_viewport_array &&
- _mesa_is_gles31(ctx))) {
+ if (_mesa_has_ARB_viewport_array(ctx) ||
+ _mesa_has_OES_viewport_array(ctx)) {
*x = CLAMP(*x,
ctx->Const.ViewportBounds.Min, ctx->Const.ViewportBounds.Max);
*y = CLAMP(*y,