summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_atomics.c
Commit message (Collapse)AuthorAgeFilesLines
* nir: move to compiler/Emil Velikov2016-01-261-166/+0
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* glsl: tidy up struct with a single memberTimothy Arceri2015-12-301-1/+1
| | | | | | | | | | | There used to be more members but they now share other fields in order to keep memory use low. Also making the naming more generic will allow us to reuse the field for explicit byte offsets within blocks for ARB_enhanced_layouts. Reviewed-by: Edward O'Callaghan <[email protected]>
* nir: Get rid of function overloadsJason Ekstrand2015-12-281-4/+4
| | | | | | | | | | | | | | | | | When Connor originally drafted NIR, he copied the same function+overload system that GLSL IR had with a few names changed. However, this double-indirection is not really needed and has only served to confuse people. Instead, let's just have functions which may not have unique names and may or may not have an implementation. If someone wants to do overload resolving, they can hav a hash table based function+overload system in the overload resolving pass. There's no good reason to keep it in core NIR. Reviewed-by: Connor Abbott <[email protected]> Acked-by: Kenneth Graunke <[email protected]> ir3 bits are Reviewed-by: Rob Clark <[email protected]>
* glsl: keep track of intra-stage indices for atomicsTimothy Arceri2015-10-271-5/+20
| | | | | | | | | | | | | | | This is more optimal as it means we no longer have to upload the same set of ABO surfaces to all stages in the program. This also fixes a bug where since commit c0cd5b var->data.binding was being used as a replacement for atomic buffer index, but they don't have to be the same value they just happened to end up the same when binding is 0. Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Alejandro Piñeiro <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90175
* nir: add atomic lowering support for AoATimothy Arceri2015-10-171-10/+12
| | | | | Cc: Francisco Jerez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Remove the mem_ctx parameter from ssa_def_rewrite_usesJason Ekstrand2015-09-111-2/+1
| | | | Reviewed-by: Thomas Helland <[email protected]>
* nir: Fix a bunch of ralloc parenting errorsJason Ekstrand2015-09-111-1/+1
| | | | | | | | | | | | | | As of a10d4937, we would really like things associated with an instruction to be allocated out of that instruction and not out of the shader. In particular, you should be passing the instruction that will ultimately be holding the source into nir_src_copy rather than an arbitrary memory context. We also change the prototypes of nir_dest_copy and nir_alu_src/dest_copy to explicitly take an instruction so we catch this earlier in the future. Cc: "11.0" <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
* nir: add nir_var_shader_storageIago Toral Quiroga2015-07-141-1/+2
| | | | Reviewed-by: Jordan Justen <[email protected]>
* nir: remove extra semicolonTimothy Arceri2015-06-031-1/+1
| | | | | | Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: Fix indexing of atomic counter arrays with a constant value.Francisco Jerez2015-05-121-1/+2
| | | | | Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Drop dependency on mtypes.h for core NIR.Eric Anholt2015-02-201-0/+1
| | | | | | | | One less new directory necessary for gallium code that wants to interact with NIR. Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* nir: Remove casts from void*.Matt Turner2015-02-101-2/+1
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Use pointers for nir_src_copy and nir_dest_copyJason Ekstrand2015-01-261-2/+2
| | | | | | | | This avoids the overhead of copying structures and better matches the newly added nir_alu_src_copy and nir_alu_dest_copy. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: Make an easier helper for setting up SSA defs.Eric Anholt2015-01-221-7/+4
| | | | | | | | Almost all instructions we nir_ssa_def_init() for are nir_dests, and you have to keep from forgetting to set is_ssa when you do. Just provide the simpler helper, instead. Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Stop using designated initializersJason Ekstrand2015-01-211-5/+3
| | | | | | | | | Designated initializers with anonymous unions don't work in MSVC or GCC < 4.6. With a couple of constructor methods, we don't need them any more and the code is actually cleaner. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88467 Reviewed-by: Connor Abbot <[email protected]>
* nir: Make load_const SSA-onlyJason Ekstrand2015-01-151-12/+5
| | | | | | | | As it was, we weren't ever using load_const in a non-SSA way. This allows us to substantially simplify the load_const instruction. If we ever need a non-SSA constant load, we can do a load_const and an imov. Reviewed-by: Connor Abbott <[email protected]>
* nir/lower_atomics: Use/support SSAJason Ekstrand2015-01-151-18/+32
| | | | | | | | | | | Previously, lower_atomics was non-SSA only. We assert-failed if the destination of an atomic operation intrinsic was an SSA def and we used temporary registers for computing offsets. This commit changes both of these behaviors. We now use SSA values for computing offsets (so we can optimize them) and we handle SSA destinations. We also move the pass to run before we go out of SSA on i965 as it now generates SSA values. Reviewed-by: Connor Abbott <[email protected]>
* nir: Call nir_metadata_preserve more placesJason Ekstrand2015-01-151-1/+4
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Make array deref direct vs. indirect an enumJason Ekstrand2015-01-151-1/+1
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/lower_atomics: Multiply array offsets by ATOMIC_COUNTER_SIZEJason Ekstrand2015-01-151-1/+17
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: add a pass to lower atomicsConnor Abbott2015-01-151-0/+127
v2: Jason Ekstrand <[email protected]> whitespace fixes