glamor_init: clamp GLSL to 120 if platform doesn't have instanced arrays

Lukas Hartmann lukas at mntmn.com
Wed May 16 07:39:33 UTC 2018


Good call, I don’t know if this is a bug or on purpose. I’ll try to find that out. But on a GL 3.0-3.2 platform this would still fail if there was no support for glVertexAttribDivisor, or am I wrong?

Cheers
Lukas

> On 16. May 2018, at 01:05, Dave Airlie <airlied at gmail.com> wrote:
> 
>> On 16 May 2018 at 05:51, Lukas F. Hartmann <lukas at mntmn.com> wrote:
>> Hi,
>> 
>> I upgraded Xwayland and the assorted libraries from git masters today,
>> and noticed that glamor wouldn't work anymore on i.MX6/etnaviv. The
>> error was:
>> 
>> No provider of glVertexAttribDivisor found.  Requires one of:
>>    Desktop OpenGL 3.3
>>    OpenGL ES 3.0
>>    GL extension "GL_ANGLE_instanced_arrays"
>>    GL extension "GL_ARB_instanced_arrays"
>>    GL extension "GL_EXT_instanced_arrays"
>>    GL extension "GL_NV_instanced_arrays"
>> 
>> The problem is that etnaviv offers GLSL 140 on GL 2.1 and glamor
>> rendering assumes that glVertexAttribDivisor() is always available on
>> GLSL>=130, which is not the case here. Forcing GLSL 120 makes glamor
>> work fine again on this platform. After chatting with ajax in
>> #xorg-devel, the following solution was proposed.
> 
> I'm not sure it's legal to expose GLSL 1.40 on GL 2.1.
> 
> Dave.



More information about the xorg-devel mailing list