OSDN Git Service

glsl/builtin_variables: Add a precision to the builtins
authorNeil Roberts <nroberts@igalia.com>
Fri, 5 Jul 2019 18:54:32 +0000 (20:54 +0200)
committerNeil Roberts <nroberts@igalia.com>
Thu, 11 Jul 2019 06:04:54 +0000 (08:04 +0200)
commitca6ee488e9c52fd6ff0e99556b091baf421caa67
tree13a92319c3575561b0fbc07793ead58d5aa8d02a
parentce93bf18767921dbcba4be0039d912e2fe7b276d
glsl/builtin_variables: Add a precision to the builtins

All of the builtin variables mentioned in the GLSL ES spec and the
extensions include a precision declaration which is different
depending on what the variable is used for. This patch makes it set
the corresponding precision when creating the variable. This will make
a difference once we start using the precision information for
optimisation. Previously all of the builtin variables ended up with a
precision of NONE.

v2: Made gl_PointSize and gl_FragCoord highp since GLSL ES 3.00. Fixed
    gl_MaxViewPorts to always be highp. (Eric Anholt)

Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/glsl/builtin_variables.cpp