Bug 71630 - Desktop extension defined in ES 3.00 shader
Summary: Desktop extension defined in ES 3.00 shader
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: 9.1
Hardware: x86 (IA32) Linux (All)
: medium minor
Assignee: Matt Turner
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 06:12 UTC by Stanislav Vorobiov
Modified: 2014-01-24 03:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Stanislav Vorobiov 2013-11-15 06:12:02 UTC
The following shader won't compile on desktop mesa 9.1.7:

#version 300 es
...
#ifdef GL_ARB_draw_instanced
#extension GL_ARB_draw_instanced : require
#endif

mesa has GL_ARB_ES3_compatibility and shader version is ES 3.00,
GL_ARB_draw_instanced appears to be defined in preprocessor, but
the line:

#extension GL_ARB_draw_instanced : require

doesn't compile. So the line above either has to be able to compile
or GL_ARB_draw_instanced shouldn't be defined in preprocessor

glxinfo:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop x86/MMX/SSE2
OpenGL version string: 3.0 Mesa 9.1.7
OpenGL shading language version string: 1.30

uname -a:
Linux xxx 3.11.0-13-generic #20~precise2-Ubuntu SMP Thu Oct 24 21:07:45 UTC 2013 i686 i686 i386 GNU/Linux
Comment 1 Matt Turner 2013-11-15 07:39:23 UTC
I think I fixed this with e21debbf751c86a991dc1fdc39bc4e3b7b82b9cb ("glcpp: Don't define macros for extensions that aren't in ES") almost a year ago to the day.

git tag --contains=... says that it's in

mesa-9.1
mesa-9.1-rc1
mesa-9.1-rc2
mesa-9.1.1
mesa-9.1.2
mesa-9.1.3
mesa-9.1.4
mesa-9.1.5
mesa-9.1.6
mesa-9.1.7
mesa-9.2
mesa-9.2-rc1
mesa-9.2-rc2
mesa-9.2.1
mesa-9.2.2
mesa-9.2.3

and I can't reproduce with a shader_test:

[require]
GL ES >= 3.0
GLSL ES >= 3.0
[vertex shader passthrough]
[fragment shader]
#version 300 es
#ifdef GL_ARB_draw_instanced
#extension GL_ARB_draw_instanced : require
#endif
void main() {}

but I suppose there could be a bad interaction caused when creating the shader program via GL_ARB_ES3_compatibility?
Comment 2 Stanislav Vorobiov 2013-11-15 10:18:24 UTC
m.b. it's because of versioned context, I create context like this:

    int attribs[] =
    {
        GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
        GLX_CONTEXT_MINOR_VERSION_ARB, 1,
        GLX_RENDER_TYPE, GLX_RGBA_TYPE,
        GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
        None
    };

    glXCreateContextAttribsARB(..., attribs);
Comment 3 Matt Turner 2014-01-18 22:07:21 UTC
Patch sent to the mailing list (and with you Cc'd). Please test! :)
Comment 4 Matt Turner 2014-01-23 19:34:43 UTC
(In reply to comment #3)
> Patch sent to the mailing list (and with you Cc'd). Please test! :)

I've committed the patch. Feel free to update this bug report if you test it.
Comment 5 Stanislav Vorobiov 2014-01-24 03:31:33 UTC
Didn't have time to test it, I'll try it today, thanks!


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.