From 0d6a2439eeefe426304199a872a479c75aa92f53 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 8 Aug 2018 13:54:43 +0200 Subject: [PATCH] vrend,feature: correct handling of feat_texture_buffer_range and use it This exposes OES_texture_buffer on a GLES 3.2 host. Closes: #10 Signed-off-by: Gert Wollny --- src/vrend_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index c47748b..eb4d901 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -197,7 +197,7 @@ static const struct { [feat_tessellation] = { 40, 32, { "GL_ARB_tessellation_shader", "GL_OES_tessellation_shader", "GL_EXT_tessellation_shader" } }, [feat_texture_array] = { 30, 30, { "GL_EXT_texture_array" } }, [feat_texture_barrier] = { 45, UNAVAIL, { "GL_ARB_texture_barrier" } }, - [feat_texture_buffer_range] = { 43, UNAVAIL, { "GL_ARB_texture_buffer_range" } }, + [feat_texture_buffer_range] = { 43, 32, { "GL_ARB_texture_buffer_range" } }, [feat_texture_gather] = { 40, 31, { "GL_ARB_texture_gather" } }, [feat_texture_multisample] = { 32, 30, { "GL_ARB_texture_multisample" } }, [feat_texture_srgb_decode] = { UNAVAIL, UNAVAIL, { "GL_EXT_texture_sRGB_decode" } }, @@ -8123,7 +8123,7 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c glGetIntegerv(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET, &caps->v2.max_texture_gather_offset); } - if (gl_ver >= 43) { + if (has_feature(feat_texture_buffer_range)) { glGetIntegerv(GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT, (GLint*)&caps->v2.texture_buffer_offset_alignment); }