mesa: Add a check for OES_viewport_array

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
Anuj Phogat
2016-09-28 11:40:37 -07:00
parent 0a7691ee62
commit 239ff64173
+3 -1
View File
@@ -52,7 +52,9 @@ set_viewport_no_notify(struct gl_context *ctx, unsigned idx,
* determined by calling GetFloatv with the symbolic constant
* VIEWPORT_BOUNDS_RANGE (see section 6.1)."
*/
if (ctx->Extensions.ARB_viewport_array) {
if (ctx->Extensions.ARB_viewport_array ||
(ctx->Extensions.OES_viewport_array &&
_mesa_is_gles31(ctx))) {
x = CLAMP(x,
ctx->Const.ViewportBounds.Min, ctx->Const.ViewportBounds.Max);
y = CLAMP(y,