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

Eric Anholt eric at anholt.net
Wed May 16 09:26:29 UTC 2018


"Lukas F. Hartmann" <lukas at mntmn.com> writes:

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

In Mesa we've decided in the past to not expose GLSL >= 1.30 on GL 2.x,
because you can't use most of the new functionality of GLSL 1.30 without
GL 3.x's APIs.

However, it would be awfully nice for glamor if Mesa drivers *could*
expose 1.30 on GL2 (if you've got integer textures, you could do
glamor_font.c's accelerated core text rendering, for example), so I'm
tempted to take the patch for now so we can start working toward that.

Reviewed-by: Eric Anholt <eric at anholt.net>

but I'll give others a chance to offer input on this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180516/b47bae37/attachment-0001.sig>


More information about the xorg-devel mailing list