Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | nir: Remove deref chain support from lower_wpos_center | Jason Ekstrand | 2018-06-22 | 1 | -11/+2 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from lower_system_values | Jason Ekstrand | 2018-06-22 | 1 | -13/+11 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from remove_unused_varyings | Jason Ekstrand | 2018-06-22 | 1 | -7/+6 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Delete lower_io_types | Jason Ekstrand | 2018-06-22 | 3 | -180/+0 |
| | | | | | | | | | | It's only used by the ir3 stand-alone compiler and Rob said we could delete it. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from lower_phis_to_scalar | Jason Ekstrand | 2018-06-22 | 1 | -7/+2 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Convert lower_io to deref instructions | Jason Ekstrand | 2018-06-22 | 1 | -68/+37 |
| | | | | | | | | | | | This deletes support for _var intrinsics and legacy deref chains in favor of deref instructions. The internals are also reworked a bit to use deref instructions directly. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir/lower_io: Convert atomic lowering to deref instructions | Jason Ekstrand | 2018-06-22 | 1 | -23/+27 |
| | | | | | | | | | | | No one is currently using so we can make this change irrespective of driver. We may use it again in i965 so it's best to pretend to keep it working. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from lower_global_vars_to_local | Jason Ekstrand | 2018-06-22 | 1 | -18/+4 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from lower_clamp_color_outputs | Jason Ekstrand | 2018-06-22 | 1 | -3/+2 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from lower_alpha_test | Jason Ekstrand | 2018-06-22 | 1 | -3/+2 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from lower_clip_cull_distance_arrays | Jason Ekstrand | 2018-06-22 | 1 | -52/+2 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Remove deref chain support from lower_indirect_derefs | Jason Ekstrand | 2018-06-22 | 1 | -161/+2 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Rework gather_info to entirely use deref instructions | Jason Ekstrand | 2018-06-22 | 1 | -28/+14 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir/vars_to_ssa: Rework to entirely use deref instructions | Jason Ekstrand | 2018-06-22 | 1 | -184/+152 |
| | | | | | | | | | | | This commit reworks nir_lower_vars_to_ssa to use deref instructions and deref paths internally instead of deref chains. We also drop support for the old load/store/copy_var intrinsics. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir/vars_to_ssa: Add an is_direct field to deref_node | Jason Ekstrand | 2018-06-22 | 1 | -16/+25 |
| | | | | | | | | | | This makes us build the is_direct parameter as the nodes are constructed rather than as we walk the chain. This will be useful later. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: convert lower_io_arrays_to_elements to deref instructions | Rob Clark | 2018-06-22 | 1 | -79/+81 |
| | | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: convert lower_io_to_scalar to deref instructions | Rob Clark | 2018-06-22 | 1 | -46/+46 |
| | | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Use deref instructions in lower_constant_initializers | Jason Ekstrand | 2018-06-22 | 3 | -84/+39 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir/builder: Use deref instructions for load/store/copy_var | Jason Ekstrand | 2018-06-22 | 1 | -24/+4 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir,spirv: Rework function calls | Jason Ekstrand | 2018-06-22 | 11 | -377/+110 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit completely reworks function calls in NIR. Instead of having a set of variables for the parameters and return value, nir_call_instr now has simply has a number of sources which get mapped to load_param intrinsics inside the functions. It's up to the client API to build an ABI on top of that. In SPIR-V, out parameters are handled by passing the result of a deref through as an SSA value and storing to it. This virtue of this approach can be seen by how much it allows us to delete from core NIR. In particular, nir_inline_functions gets halved and goes from a fairly difficult pass to understand in detail to almost trivial. It also simplifies spirv_to_nir somewhat because NIR functions never were a good fit for SPIR-V. Unfortunately, there is no good way to do this without a mega-commit. Core NIR and SPIR-V have to be changed at the same time. This also requires changes to anv and radv because nir_inline_functions couldn't handle deref instructions before this change and can't work without them after this change. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Add a concept of per-member structs and a lowering pass | Jason Ekstrand | 2018-06-22 | 6 | -0/+330 |
| | | | | | | | | | | | | | This adds a concept of "members" to a variable with an interface type. It allows you to specify the full variable data for each member of the interface instead of once for the variable. We also add a lowering pass to lower those variables to a sequence of variables and rewrite all the derefs accordingly. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir/lower_tex: Always copy deref and offset sources | Jason Ekstrand | 2018-06-22 | 1 | -11/+32 |
| | | | | | | | | | | | This should make nir_lower_tex properly handle deref instructions as well as make it more correct when texture arrays are used and it's called after lowering samplers to binding table indices. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in opt_undef | Jason Ekstrand | 2018-06-22 | 1 | -4/+7 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Consider deref instructions in opt_peephole_select | Jason Ekstrand | 2018-06-22 | 1 | -2/+11 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Consider deref instructions in lower_phis_to_scalar | Jason Ekstrand | 2018-06-22 | 1 | -2/+9 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_drawpixels | Jason Ekstrand | 2018-06-22 | 1 | -6/+14 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_clamp_color_outputs | Jason Ekstrand | 2018-06-22 | 1 | -4/+6 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_alpha_test | Jason Ekstrand | 2018-06-22 | 1 | -2/+6 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in loop_analyze | Jason Ekstrand | 2018-06-22 | 1 | -4/+47 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in remove_unused_varyings | Jason Ekstrand | 2018-06-22 | 1 | -25/+27 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_pos_center | Jason Ekstrand | 2018-06-22 | 1 | -3/+12 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_wpos_ytransform | Jason Ekstrand | 2018-06-22 | 1 | -11/+42 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_io | Jason Ekstrand | 2018-06-22 | 1 | -22/+48 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in gather_info | Jason Ekstrand | 2018-06-22 | 1 | -9/+22 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in propagate_invariant | Jason Ekstrand | 2018-06-22 | 1 | -5/+20 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_clip_cull | Jason Ekstrand | 2018-06-22 | 1 | -6/+65 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_system_values | Jason Ekstrand | 2018-06-22 | 1 | -5/+13 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_indirect_derefs | Jason Ekstrand | 2018-06-22 | 1 | -2/+155 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_vars_to_ssa | Jason Ekstrand | 2018-06-22 | 1 | -19/+58 |
| | | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in split_var_copies | Jason Ekstrand | 2018-06-22 | 1 | -2/+42 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_var_copies | Jason Ekstrand | 2018-06-22 | 3 | -5/+143 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Add a deref path helper struct | Jason Ekstrand | 2018-06-22 | 3 | -0/+113 |
| | | | | | | | | | | | | | | | | | | This commit introduces a new nir_deref.h header for helpers that are less common and really only needed by a few heavy-duty passes. In this header is a new struct for representing a full deref path which can be walked in either direction. v2 (Jason Ekstrand): - Assert that deref != NULL (Caio) - Fill _short_path with 0xdeadbeef in debug builds when not used (Caio) - Make nir_deref_path a typedef (Rob) Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_io_to_temporaries | Jason Ekstrand | 2018-06-22 | 1 | -0/+2 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in lower_global_vars_to_local | Jason Ekstrand | 2018-06-22 | 1 | -23/+42 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Add a pass for fixing deref modes | Jason Ekstrand | 2018-06-22 | 2 | -0/+32 |
| | | | | | | | | | | | This will be needed by anything which changes variable modes without rewriting derefs. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Support deref instructions in remove_dead_variables | Jason Ekstrand | 2018-06-22 | 1 | -2/+92 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: add deref lowering sanity checking | Rob Clark | 2018-06-22 | 32 | -0/+78 |
| | | | | | | | | | | | | | This will be removed at the end of the transition, but add some tracking plus asserts to help ensure that lowering passes are called at the correct point (pre or post deref instruction lowering) as passes are converted and the point where lower_deref_instrs() is called is moved. Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir/deref: Add some deref cleanup functions | Jason Ekstrand | 2018-06-22 | 2 | -0/+57 |
| | | | | | | | | | | | Sometimes it's useful for a pass to be able to clean up its own derefs instead of waiting for DCE. This little helper makes it very easy. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Add helpers for working with deref instructions | Jason Ekstrand | 2018-06-22 | 4 | -0/+362 |
| | | | | | | | | | | | This commit adds a pass for lowering deref instructions to deref chains as well as some smaller helpers to ease the transition. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> | ||||
* | nir: Add deref sources to texture instructions | Jason Ekstrand | 2018-06-22 | 2 | -0/+8 |
| | | | | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> |