Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | nir/opt_if: Remove unneeded phis if we make progress | Jason Ekstrand | 2018-06-26 | 3 | -3/+11 |
| | | | | | | | | | | Now that SSA values can be derefs and they have special rules, we have to be a bit more careful about our LCSSA phis. In particular, we need to clean up in case LCSSA ended up creating a phi node for a deref. This fixes validation issues with some Vulkan CTS tests with the new deref instructions. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> | ||||
* | nir/lower_system_values: Assert/assume direct var derefs | Jason Ekstrand | 2018-06-22 | 1 | -4/+13 |
| | | | | | | | | | | | | | System values are never arrays or structs so we can assume a direct var deref. This simplifies things a bit and prevents us from accidentally throwing away an array index. Suggested-by: Caio Marcelo de Oliveira Filho <[email protected]> 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: Remove old-school deref chain support | Jason Ekstrand | 2018-06-22 | 38 | -1354/+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: Remove deref chain support from analyze_loops | Jason Ekstrand | 2018-06-22 | 1 | -56/+0 |
| | | | | | | | | | | Note that this patch needs to come late in the series since this pass can be run after any pass that damages nir_metadata_loop_analysis. 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: promote intrinsic_get_var() to helper | Rob Clark | 2018-06-22 | 2 | -10/+10 |
| | | | | | | | | | | Useful in a few other places.. let's not copy-pasta 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: Rework lower_locals_to_regs to use deref instructions | Jason Ekstrand | 2018-06-22 | 1 | -100/+88 |
| | | | | | | | | | | This completely reworks the pass to support deref instructions and delete support for old deref chains 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 opt_copy_prop_vars to use deref instructions | Jason Ekstrand | 2018-06-22 | 1 | -170/+146 |
| | | | | | | | 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/copy_prop_vars: Re-order some logic in compare_derefs | Jason Ekstrand | 2018-06-22 | 1 | -8/+8 |
| | | | | | | | 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 split_per_member_structs | Jason Ekstrand | 2018-06-22 | 1 | -83/+3 |
| | | | | | | | 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 opt_undef | Jason Ekstrand | 2018-06-22 | 1 | -1/+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 split_var_copies | Jason Ekstrand | 2018-06-22 | 1 | -210/+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: Remove deref chain support from dead_variables | Jason Ekstrand | 2018-06-22 | 1 | -83/+3 |
| | | | | | | | 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 propagate_invariant | Jason Ekstrand | 2018-06-22 | 1 | -11/+3 |
| | | | | | | | 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_var_copies | Jason Ekstrand | 2018-06-22 | 1 | -132/+8 |
| | | | | | | | 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_drawpixels | Jason Ekstrand | 2018-06-22 | 1 | -13/+5 |
| | | | | | | | 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 opt_peephole_select | 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_tex | Jason Ekstrand | 2018-06-22 | 1 | -6/+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_wpos_ytransform | Jason Ekstrand | 2018-06-22 | 1 | -36/+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_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]> |