[Mesa-dev] [PATCH 2/3] mesa: Add a check for OES_viewport_array

Anuj Phogat anuj.phogat at gmail.com
Thu Sep 29 18:42:36 UTC 2016


Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Cc: Ilia Mirkin <imirkin at alum.mit.edu>
---
 src/mesa/main/viewport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index f59723f..bd58044 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -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,
-- 
2.5.5



More information about the mesa-dev mailing list