[Mesa-dev] [PATCH] glsl: Emit better warnings for things that look like default precision statements

Matt Turner mattst88 at gmail.com
Tue Aug 13 15:50:20 PDT 2013


On Tue, Aug 13, 2013 at 1:35 PM, Ian Romanick <idr at freedesktop.org> wrote:
> and the spec doesn't explicitly forbid it.

I was surprised by this, so I verified it.

In the GLSL ES 3.0 spec:

single_declaration
 fully_specified_type
  type_specifier
   precision_qualifier type_specifier_no_prec

precision_qualifier
 <highp, mediump, lowp>

type_specifier_no_prec
 type_specifier_nonarray
  <expands to list of built-in types>

Seems weird, but legitimate.

Have we actually seen 'highp float;' in the wild (outside of piglit)?

Assuming that the two instances of "highp" in precision_names is
intentional (or was not, but is fixed)

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list