[virglrenderer-devel] [PATCH] vrend: Add more caps for gles

Stéphane Marchesin marcheu at chromium.org
Sat Mar 31 02:12:21 UTC 2018


This adds texture array and primitive restart caps which are
available on gles3.

Signed-off-by: Stéphane Marchesin <marcheu at chromium.org>
---
 src/vrend_renderer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 4a0e61c..6838e01 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -6577,6 +6577,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;
@@ -6623,6 +6624,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;
    }
-- 
2.17.0.rc1.321.gba9d0f2565-goog



More information about the virglrenderer-devel mailing list