mesa/src
Tomasz Figa fd0cf2c946 glsl: Allow precision mismatch on dead data with GLSL ES 1.00
Commit 259fc50545 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 <tfiga@chromium.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 0886be093f)
2017-11-07 18:35:54 +02:00
..
amd radv: Disallow indirect outputs for GS on GFX9 as well. 2017-11-07 18:35:54 +02:00
broadcom broadcom: correct header file in BROADCOM_FILES 2017-07-24 01:40:05 +03:00
compiler glsl: Allow precision mismatch on dead data with GLSL ES 1.00 2017-11-07 18:35:54 +02:00
egl wayland-drm: use a copy of the wayland_drm_callbacks struct 2017-10-17 16:59:31 +01:00
gallium i915g: make gears run again. 2017-11-07 18:35:54 +02:00
gbm gbm: fix typo 2017-07-19 15:51:54 +01:00
getopt
glx glxcmds: Fix a typo in the __APPLE__ codepath 2017-08-17 15:48:20 -07:00
gtest gtest: Update to 1.8.0. 2017-01-20 11:40:52 -08:00
hgl glapi/hgl: remove the final user of _glapi_check_table() 2016-10-06 15:03:46 +01:00
intel intel/compiler/gen9: Pixel shader header only workaround 2017-11-07 18:35:53 +02:00
loader dri3: Wait for all pending swapbuffers to be scheduled before touching the front 2017-08-05 00:09:25 +01:00
mapi mapi: add missing no_error tag to glBlitNamedFramebuffer() 2017-07-18 10:07:34 +02:00
mesa i965: Check CCS_E compatibility for texture view rendering 2017-11-07 18:35:53 +02:00
util util/queue: fix a race condition in the fence code 2017-10-11 17:22:55 +01:00
vulkan vulkan/wsi: Free the event in x11_manage_fifo_queues(). 2017-10-27 18:04:59 +03:00
Makefile.am build systems: move git_sha1_gen.sh to bin/ 2017-07-06 22:59:39 +01:00
SConscript scons: use python3-compatible print() 2017-10-17 16:59:31 +01:00