[Mesa-dev] [PATCH] mesa: add support for exposing up to GL4.2

Ilia Mirkin imirkin at alum.mit.edu
Thu Apr 23 08:15:03 PDT 2015


On Thu, Apr 23, 2015 at 11:08 AM, Matt Turner <mattst88 at gmail.com> wrote:
> On Thu, Apr 23, 2015 at 7:53 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> Add the 4.0/4.1/4.2 extensions lists to compute_version. A coule of
>> extensions aren't in mesa yet, so those are marked with 0 until they
>> become supported.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> ---
>>
>> I wasn't 100% sure about shading_language_packing -- it includes a
>> couple of functions that don't appear until GL 4.2. However since it's
>> enabled for all the drivers that matter in mesa, wtvr.
>
> What makes you think that?
>
> I actually fixed something recently where we were exposing some
> shading_language_packing functions as GLSL 4.0 instead of 4.2. As far
> as I'm aware, it's part of 4.2.
>
> commit 8d3aa5926b73c67c7dbd4477b7177aaa00c533e5
> Author: Matt Turner <mattst88 at gmail.com>
> Date:   Wed Mar 11 18:14:28 2015 -0700
>
>     glsl: Expose built-in packing functions under GLSL 4.2.
>
>     ARB_shading_language_packing is part of GLSL 4.2, not 4.0 as I
>     mistakenly believed. The following functions are available only with
>     ARB_shading_language_packing, GLSL 4.2 (not GLSL 4.0), or ES 3.0:
>
>        - packSnorm2x16
>        - unpackSnorm2x16
>        - packHalf2x16
>        - unpackHalf2x16
>
>     Reviewed-by: Carl Worth <cworth at cworth.org>
>     Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Right. Those were the functions from shading_language_packing that
don't appear until GL 4.2. But other ones it includes are in GL 4.0
(packUnorm*, packSnorm4x8). In a theoretical world where we wanted to
support every possibility, we'd have a separate "packing_400" internal
enable which would imply that only the 4.0 ones are there. But in
practice, it's all-or-nothing, so who cares. So I included it in the
4.0 list.

Buuut... oops. Looks like those actually come in via ARB_gpu_shader5
as well. And shading_language_packing has those *and* the extra ones
(for GPUs that don't do gs5). OK. I'll move it to the 4.2 list.

  -ilia


More information about the mesa-dev mailing list