[Mesa-dev] [PATCH] glsl: Allow default precision qualifiers to be set for sampler types.

Eric Anholt eric at anholt.net
Tue Feb 12 15:33:08 PST 2013

Paul Berry <stereotype441 at gmail.com> writes:

> From GLSL ES 3.00 section 4.5.4 ("Default Precision Qualifiers"):
>     "The precision statement
>         precision precision-qualifier type;
>     can be used to establish a default precision qualifier. The type
>     field can be either int or float or any of the sampler types, and
>     the precision-qualifier can be lowp, mediump, or highp."
> GLSL ES 1.00 has similar language.  GLSL 1.30 doesn't allow precision
> qualifiers on sampler types, but this seems like an oversight (since
> the intention of including these in GLSL 1.30 is to allow
> compatibility with ES shaders).
> Previously, Mesa followed GLSL 1.30 and only allowed default precision
> qualifiers to be set for float and int.  This patch makes it follow
> GLSL ES rules in all cases.


Also, what a weird language -- you can set different precisions for ints
vs floats vs all the different samplers, but not uints?  usampler
precision might matter separately from isampler, but not uint vs int?

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130212/a0869787/attachment.pgp>

More information about the mesa-dev mailing list