mesa/src
Kenneth Graunke 7d539080c1 nir: Add a writemask to store intrinsics.
Tessellation control shaders need to be careful when writing outputs.
Because multiple threads can concurrently write the same output
variables, we need to only write the exact components we were told.

Traditionally, for sub-vector writes, we've read the whole vector,
updated the temporary, and written the whole vector back.  This breaks
down with concurrent access.

This patch prepares the way for a solution by adding a writemask field
to store_var intrinsics, as well as the other store intrinsics.  It then
updates all produces to emit a writemask of "all channels enabled".  It
updates nir_lower_io to copy the writemask to output store intrinsics.

Finally, it updates nir_lower_vars_to_ssa to handle partial writemasks
by doing a read-modify-write cycle (which is safe, because local
variables are specific to a single thread).

This should have no functional change, since no one actually emits
partial writemasks yet.

v2: Make nir_validate momentarily assert that writemasks cover the
    complete value - we shouldn't have partial writemasks yet
    (requested by Jason Ekstrand).

v3: Fix accidental SSBO change that arose from merge conflicts.

v4: Don't try to handle writemasks in ir3_compiler_nir - my code
    for indirects was likely wrong, and TTN doesn't generate partial
    writemasks today anyway.  Change them to asserts as requested by
    Rob Clark.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> [v3]
2015-12-22 15:57:59 -08:00
..
egl egl: don't forget to ship platform_x11_dri3.h into the tarball 2015-11-20 18:08:04 +00:00
gallium nir: Add a writemask to store intrinsics. 2015-12-22 15:57:59 -08:00
gbm gbm.h: Add a missing stddef.h include for size_t. 2015-10-30 19:12:14 +00:00
getopt
glsl nir: Add a writemask to store intrinsics. 2015-12-22 15:57:59 -08:00
glx glx/dri3: a drawable might not be bound at wait time 2015-12-21 06:43:58 -05:00
gtest mesa: Enable subdir-objects globally. 2015-06-26 12:55:25 +01:00
hgl glapi/hgl: Drop extern "C" as it was added to glapi 2015-05-13 15:26:29 -04:00
loader loader: unconditionally add AM_CPPFLAGS to libloader_la_CPPFLAGS 2015-11-23 12:07:50 +00:00
mapi mesa: do not enable KHR_debug for ES 1.0 2015-12-03 19:17:48 +00:00
mesa nir: Add a writemask to store intrinsics. 2015-12-22 15:57:59 -08:00
util ralloc: Fix ralloc_adopt() to the old context's last child's parent. 2015-12-18 23:30:51 -08:00
Makefile.am glsl: move shader_enums into nir 2015-10-09 15:03:28 -04:00
SConscript scons: rework the EGL build 2015-07-22 16:35:27 +01:00