mesa/src
Ilia Mirkin 4d24a7cb97 glsl: fix derived cs variables
There are two issues with the current implementation. First, it relies
on the layout(local_size_*) happening in the same shader as the main
function, and secondly it doesn't work for variable group sizes.

In both cases, the simplest fix is to move the setup of these derived
values to a later time, similar to how the gl_VertexID workarounds are
done. There already exist system values defined for both of the derived
values, so we use them unconditionally, and lower them after linking is
performed.

While we're at it, we move to using gl_LocalGroupSizeARB instead of
gl_WorkGroupSize for variable group sizes.

Also the dead code elimination avoidance can be removed, since there
can be situations where gl_LocalGroupSizeARB is needed but has not been
inserted for the shader with main function. As a result, the lowering
code has to insert its own copies of the system values if needed.

Reported-by: Stephane Chevigny <stephane.chevigny@polymtl.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103393
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-10-23 08:34:56 -04:00
..
amd radv: automake: include radv_extensions.py in the tarball 2017-10-23 12:37:01 +02:00
broadcom meson: Fix vc5 deps on the XML-generated headers. 2017-10-20 17:16:00 -07:00
compiler glsl: fix derived cs variables 2017-10-23 08:34:56 -04:00
egl meson: Add support for EGL glvnd 2017-10-20 16:46:48 -07:00
gallium ac/nir: Only clamp shadow reference on radeonsi. 2017-10-23 09:13:38 +02:00
gbm meson: build libEGL 2017-10-20 16:46:48 -07:00
getopt
glx meson: build libEGL 2017-10-20 16:46:48 -07:00
gtest meson: convert gtest to an internal dependency 2017-10-03 10:02:08 -07:00
hgl glapi/hgl: remove the final user of _glapi_check_table() 2016-10-06 15:03:46 +01:00
intel anv: don't assert on device init on Cannonlake 2017-10-21 02:37:33 +01:00
loader meson: split and simplify dependencies 2017-10-16 16:32:43 -07:00
mapi mapi/shared-glapi/test: rework glapitable.h handling 2017-10-13 11:12:08 -07:00
mesa nir: Get rid of nir_shader::stage 2017-10-20 12:49:17 -07:00
util drirc: Group a few games in the glthread whitelist together. 2017-10-19 03:28:34 +02:00
vulkan meson: move wayland_drm_protocol generation to wayland-drm 2017-10-20 16:46:48 -07:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am configure: Add the new "vc5" driver to the list, requiring a simulator. 2017-10-10 11:42:04 -07:00
meson.build meson: build libEGL 2017-10-20 16:46:48 -07:00
SConscript scons: use python3-compatible print() 2017-09-25 11:57:12 +01:00