glsl: Add new barrier functions for compute shaders
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 9 Oct 2015 21:16:05 +0000 (14:16 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Fri, 6 Nov 2015 21:14:44 +0000 (13:14 -0800)
commit91f188710ad8dce79936c5d28fd7b9a91b6d870a
tree20363dcfe9e086fef266741528490b3647ae0306
parent6bad554d98004e6c8ab46e8cbe73f3b3024e55c5
glsl: Add new barrier functions for compute shaders

When these functions are called in GLSL code, we create an intrinsic
function call:

 * groupMemoryBarrier => __intrinsic_group_memory_barrier
 * memoryBarrierAtomicCounter => __intrinsic_memory_barrier_atomic_counter
 * memoryBarrierBuffer => __intrinsic_memory_barrier_buffer
 * memoryBarrierImage => __intrinsic_memory_barrier_image
 * memoryBarrierShared => __intrinsic_memory_barrier_shared

v2:
 * Consolidate with memoryBarrier function/intrinsic creation (curro)

v3:
 * Instead of add_memory_barrier_function, add an intrinsic_name
   parameter to _memory_barrier (curro)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/glsl/builtin_functions.cpp