From f7129507b9e8b98148876ab9ad6dca9d46a0fb71 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Thu, 15 Aug 2019 15:12:26 -0700 Subject: [PATCH] vrend_renderer: check for GL_EXT_EGL_image_storage, use features Reviewed-by: Gert Wollny --- src/vrend_renderer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 5078256..a0c9d19 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -120,8 +120,10 @@ enum features_id feat_depth_clamp, feat_draw_instance, feat_dual_src_blend, - feat_fb_no_attach, + feat_egl_image_external, + feat_egl_image_storage, feat_enhanced_layouts, + feat_fb_no_attach, feat_framebuffer_fetch, feat_framebuffer_fetch_non_coherent, feat_geometry_shader, @@ -209,6 +211,8 @@ static const struct { FEAT(dual_src_blend, 33, UNAVAIL, "GL_ARB_blend_func_extended", "GL_EXT_blend_func_extended" ), FEAT(depth_clamp, 32, UNAVAIL, "GL_ARB_depth_clamp", "GL_EXT_depth_clamp", "GL_NV_depth_clamp"), FEAT(enhanced_layouts, 44, UNAVAIL, "GL_ARB_enhanced_layouts"), + FEAT(egl_image_external, UNAVAIL, UNAVAIL, "GL_OES_EGL_image_external"), + FEAT(egl_image_storage, UNAVAIL, UNAVAIL, "GL_EXT_EGL_image_storage"), FEAT(fb_no_attach, 43, 31, "GL_ARB_framebuffer_no_attachments" ), FEAT(framebuffer_fetch, UNAVAIL, UNAVAIL, "GL_EXT_shader_framebuffer_fetch" ), FEAT(framebuffer_fetch_non_coherent, UNAVAIL, UNAVAIL, "GL_EXT_shader_framebuffer_fetch_non_coherent" ), @@ -6438,7 +6442,7 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr, debug_texture(__func__, gr); if (image_oes) { - if (epoxy_has_gl_extension("GL_OES_EGL_image_external")) { + if (has_feature(feat_egl_image_external)) { glEGLImageTargetTexture2DOES(gr->target, (GLeglImageOES) image_oes); } else { vrend_printf( "missing GL_OES_EGL_image_external extension\n");