From 85675f35b083f0d89274d9c0f4e11c2e58eb7725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= Date: Fri, 30 Mar 2018 19:12:21 -0700 Subject: [PATCH] vrend: Add more caps for gles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds texture array and primitive restart caps which are available on gles3. Tested-by: Jakob Bornecrantz Reviewed-by: Jakob Bornecrantz Signed-off-by: Stéphane Marchesin Signed-off-by: Jakob Bornecrantz --- src/vrend_renderer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 159ed09..a676126 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -6581,6 +6581,7 @@ void vrend_renderer_fill_caps_gles(uint32_t set, uint32_t version, GLint max; GLfloat range[2]; bool fill_capset2 = false; + int gles_ver = epoxy_gl_version(); if (set == 2) { fill_capset2 = true; @@ -6627,6 +6628,12 @@ void vrend_renderer_fill_caps_gles(uint32_t set, uint32_t version, caps->v1.max_viewports = 1; + if (gles_ver >= 30) { + glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &max); + caps->v1.max_texture_array_layers = max; + caps->v1.bset.primitive_restart = 1; + } + if (!fill_capset2) { return; }