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

Adam Jackson ajax at nwnk.net
Wed May 16 18:03:44 UTC 2018


On Tue, 2018-05-15 at 21:51 +0200, Lukas F. Hartmann 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"

I'm somewhat surprised Mesa doesn't expose any of ANGLE/EXT/NV in GLES2
contexts. If it did so - and if etnaviv actually implemented instanced
rendering, which it definitely has code to sometimes do - then I
suspect you wouldn't need this patch.

> 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.

Forcing GLSL 1.20 has the side effect of disabling a lot of other
acceleration paths, you'd really rather use 1.30 if you could.

Regardless, this is better than it was. Merged, thanks:

remote: I: patch #223110 updated using rev 7437b6dbdee050f8ebb3a79b9077d051c91880c3.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   3ab32a5378..7437b6dbde  master -> master

- ajax


More information about the xorg-devel mailing list