From b9a9c59ef70203cb5be0c23f73ec2b65a57442f7 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 14 Mar 2019 12:20:23 +0100 Subject: [PATCH] vrend: Use glDepthRangefOES when on GLES This fixes running Metro Redux 2033 on the GLES host. Signed-off-by: Gert Wollny Signed-off-by: Dave Airlie --- src/vrend_renderer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 8c860a1..3dbf3f6 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -2310,7 +2310,10 @@ void vrend_set_viewport_states(struct vrend_context *ctx, } else glDepthRangeIndexed(idx, ctx->sub->vps[idx].near_val, ctx->sub->vps[idx].far_val); else - glDepthRange(ctx->sub->vps[idx].near_val, ctx->sub->vps[idx].far_val); + if (vrend_state.use_gles) + glDepthRangefOES(ctx->sub->vps[idx].near_val, ctx->sub->vps[idx].far_val); + else + glDepthRange(ctx->sub->vps[idx].near_val, ctx->sub->vps[idx].far_val); } } }