diff options
author | Tomasz Figa <[email protected]> | 2017-09-26 17:35:56 +0900 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-11-13 17:17:16 +0000 |
commit | 0d11c8abfee255991d49595be9d3150fd9d212e8 (patch) | |
tree | 1b5ee238753e2041f94d907dde9867de8ec3ab8c /VERSION | |
parent | 8b2c15a60f8310f118f72026e56ec0d571996307 (diff) |
glsl: Allow precision mismatch on dead data with GLSL ES 1.00
Commit 259fc505454ea6a67aeacf6cdebf1398d9947759 added linker error for
mismatching uniform precision, as required by GLES 3.0 specification and
conformance test-suite.
Several Android applications, including Forge of Empires, have shaders
which violate this rule, on a dead varying that will be eliminated.
The problem affects a big number of applications using Cocos2D engine
and other GLES implementations accept this, this poses a serious
application compatibility issue.
Starting from GLSL ES 3.0, declarations with conflicting precision
qualifiers are explicitly prohibited. However GLSL ES 1.00 does not
clearly specify the behavior, except that
"Uniforms are defined to behave as if they are using the same storage in
the vertex and fragment processors and may be implemented this way.
If uniforms are used in both the vertex and fragment shaders, developers
should be warned if the precisions are different. Conversion of
precision should never be implicit."
The word "used" is not clear in this context and might refer to
1) declared (same as GLES 3.x)
2) referred after post-processing, or
3) linked after all optimizations are done.
Looking at existing applications, 2) or 3) seems to be widely adopted.
To avoid compatibility issues, turn the error into a warning if GLSL ES
version is lower than 3.0 and the data is dead in at least one of the
shaders.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97532
Signed-off-by: Tomasz Figa <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 0886be093fb871b0b6169718277e0f4d18df3ea7)
Diffstat (limited to 'VERSION')
0 files changed, 0 insertions, 0 deletions