mesa/src
Ian Romanick c42fe30c86 glsl: Kill __intrinsic_atomic_sub
Just generate an __intrinsic_atomic_add with a negated parameter.

Some background on the non-obvious reasons for the the big change to
builtin_builder::call()... this is cribbed from some discussion with
Ilia on mesa-dev.

Why change builtin_builder::call() to allow taking dereferences and
create them here rather than just feeding in the ir_variables directly?
The problem is the neg_data ir_variable node would have to be in two
lists at the same time: the instruction stream and parameters.  The
ir_variable node is automatically added to the instruction stream by the
call to make_temp.  Restructuring the code so that the ir_variables
could be in parameters then move them to the instruction stream would
have been pretty terrible.

ir_call in the instruction stream has an exec_list that contains
ir_dereference_variable nodes.

The builtin_builder::call method previously took an exec_list of
ir_variables and created a list of ir_dereference_variable.  All of the
original users of that method wanted to make a function call using
exactly the set of parameters passed to the built-in function (i.e.,
call __intrinsic_atomic_add using the parameters to atomicAdd).  For
these users, the list of ir_variables already existed:  the list of
parameters in the built-in function signature.

This new caller doesn't do that.  It wants to call a function with a
parameter from the function and a value calculated in the function.  So,
I changed builtin_builder::call to take a list that could either be a
list of ir_variable or a list of ir_dereference_variable.  In the former
case it behaves just as it previously did.  In the latter case, it uses
(and removes from the input list) the ir_dereference_variable nodes
instead of creating new ones.

   text	   data	    bss	    dec	    hex	filename
6036395	 283160	  28608	6348163	 60dd83	lib64/i965_dri.so before
6036923	 283160	  28608	6348691	 60df93	lib64/i965_dri.so after

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-10-04 16:53:32 -07:00
..
amd radeonsi/compute: Use the HSA abi for non-TGSI compute shaders v3 2016-09-16 23:07:10 +00:00
compiler glsl: Kill __intrinsic_atomic_sub 2016-10-04 16:53:32 -07:00
egl egl: Drop duplicate check on EGLSync type 2016-10-04 14:11:29 -07:00
gallium gallivm: Use AVX2 gather instrinsics. 2016-10-04 23:36:20 +01:00
gbm gbm: return appropriate error when queryImage() fails 2016-09-27 13:37:21 +01:00
getopt Introduce .editorconfig 2016-08-31 17:06:54 -07:00
glx direct-to-native-GL for GLX clients on Cygwin ("Windows-DRI") 2016-09-15 13:14:43 +01:00
gtest Introduce .editorconfig 2016-08-31 17:06:54 -07:00
hgl Introduce .editorconfig 2016-08-31 17:06:54 -07:00
intel anv/gen7_pipeline: Fix typo in semicolon 2016-10-04 13:20:35 -07:00
loader loader/dri3: Always use at least two back buffers 2016-09-06 13:04:48 +09:00
mapi Revert "mapi: export all GLES 3.2 functions in libGLESv2.so" 2016-09-23 12:13:13 -07:00
mesa glsl: Kill __intrinsic_atomic_sub 2016-10-04 16:53:32 -07:00
util util: remove Sun C Compiler support 2016-09-23 16:17:16 +10:00
Makefile.am glsl: Prepare standalone compiler to be able to use parameter lists 2016-09-27 11:11:15 +10:00
SConscript scons: put the generated git_sha1.h file in top-level src/ directory 2016-06-17 10:33:00 -06:00