Bug 93126 - wrongly claim supporting GL_EXT_texture_rg
Summary: wrongly claim supporting GL_EXT_texture_rg
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-26 15:24 UTC by Julien Isorce
Modified: 2015-11-28 22:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fix rg support on es2 (3.11 KB, patch)
2015-11-26 15:34 UTC, Ilia Mirkin
Details | Splinter Review

Description Julien Isorce 2015-11-26 15:24:14 UTC
es2_info prints:

GL_VERSION: OpenGL ES 2.0 Mesa 11.2.0-devel
GL_RENDERER: Gallium 0.4 on NVC1
GL_EXTENSIONS contains GL_EXT_texture_rg

But glTexImage2D(..., GL_RED_EXT, GL_UNSIGNED_BYTE, data) fails.

Indeed  if GLES2.0 then http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/main/glformats.c#n2079 . There is no case for GL_RED_EXT in the switch so it defaults to GL_INVALID_VALUE.

I can see EXT(EXT_texture_rg, ARB_texture_rg,  x ,  x ,  x , ES2, 2011) in extensions_table.h

Hardware: NVIDIA Corporation GF108 [GeForce GT 430] (rev a1)

Could it be that when querying dri2 for the gl version it returns 20 instead of 30 ?
Comment 1 Ilia Mirkin 2015-11-26 15:34:57 UTC
Created attachment 120147 [details] [review]
fix rg support on es2

Does the attached patch fix it? Not sure how you're ending up with ES2 though... I thought it'd automatically get upgraded to ES3.0... Perhaps you built without float texture support? But that should still not be required for ES3...
Comment 2 Julien Isorce 2015-11-26 15:50:54 UTC
I confirm your patch fixes the problem. (tested with glTexImage2D(..., GL_RED_EXT) + glCheckFramebufferStatusEXT). Thx Ilia :)
Comment 3 Ilia Mirkin 2015-11-28 22:29:40 UTC
Pushed as

commit 0396eaaf80c5d7955d7926c4e448f006c7682d2e
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Thu Nov 26 10:32:57 2015 -0500

    mesa: support GL_RED/GL_RG in ES2 contexts when driver support exists
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93126
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
    Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.