summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs_nir: Implement the ARB_gpu_shader5 interpolation intrinsicsJason Ekstrand2015-01-151-0/+120
| | | | Reviewed-by: Chris Forbes <[email protected]>
* i965/fs_nir: Add a has_indirect flag and clean up some of the input/output codeJason Ekstrand2015-01-151-63/+14
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a helper for getting a constant value from an SSA sourceJason Ekstrand2015-01-152-0/+20
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/glsl: Add support for gpu_shader5 interpolation instrinsicsJason Ekstrand2015-01-151-1/+79
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add gpu_shader5 interpolation intrinsicsJason Ekstrand2015-01-152-27/+21
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/validate: Validate intrinsic source/destination sizesJason Ekstrand2015-01-151-0/+26
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Vectorize intrinsicsJason Ekstrand2015-01-159-315/+123
| | | | | | | | | | We used to have the number of components built into the intrinsic. This meant that all of our load/store intrinsics had vec1, vec2, vec3, and vec4 variants. This lead to piles of switch statements to generate the correct intrinsic names, and introspection to figure out the number of components. We can make things much nicer by allowing "vectorized" intrinsics. Reviewed-by: Connor Abbott <[email protected]>
* nir: Remove the old variable lowering codeJason Ekstrand2015-01-153-1245/+0
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/validate: Ensure that outputs are write-only and inputs are read-onlyJason Ekstrand2015-01-151-0/+23
| | | | Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Use the new variable lowering codeJason Ekstrand2015-01-151-19/+25
| | | | | | | This commit switches us over to the new variable lowering code which is capable of properly handling lowering indirects as we go. Reviewed-by: Connor Abbott <[email protected]>
* nir/glsl: Generate SSA NIRJason Ekstrand2015-01-151-129/+117
| | | | | | | | | With this commit, the GLSL IR -> NIR pass generates NIR in more-or-less SSA form. It's SSA in the sense that it doesn't have any registers, but it isn't really useful SSA because it still has a pile of load/store intrinsics that we will need to get rid of. Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a pass to lower global variables to local variablesJason Ekstrand2015-01-153-0/+109
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a pass for lowering input/output loads/storesJason Ekstrand2015-01-153-0/+394
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a pass to lower local variables to registersJason Ekstrand2015-01-153-0/+316
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a pass to lower local variable accesses to SSA valuesJason Ekstrand2015-01-153-0/+1069
| | | | | | | | | This pass analizes all of the load/store operations and, when a variable is never aliased (potentially used by an indirect operation), it is lowered directly to an SSA value. This pass translates to SSA directly and does not require any fixup by the original to-SSA pass. Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a copy splitting passJason Ekstrand2015-01-153-0/+288
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Automatically update SSA if usesJason Ekstrand2015-01-151-5/+4
| | | | Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Don't dump the shader.Jason Ekstrand2015-01-151-5/+0
| | | | | | This is killing piglit. I'll leave the logging local Reviewed-by: Connor Abbott <[email protected]>
* nir/glsl: Don't allocate a state_slots array for 0 state slotsJason Ekstrand2015-01-151-6/+12
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Validate that the sources of a phi have the same size as the destinationJason Ekstrand2015-01-151-0/+13
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/copy_propagate: Don't cause size mismatches on phi node sourcesJason Ekstrand2015-01-151-0/+12
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Don't require a function in ssa_def_initJason Ekstrand2015-01-156-24/+41
| | | | | | | | Instead, we give SSA definitions a temporary index of 0xFFFFFFFF if the instruction does not have a block and a proper index when it actually gets added to the list. Reviewed-by: Connor Abbott <[email protected]>
* nir: Use an integer index for specifying structure fieldsJason Ekstrand2015-01-159-83/+75
| | | | | | | Previously, we used a string name. It was nice for translating out of GLSL IR (which also does that) but cumbersome the rest of the time. Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a concept of a wildcard array dereferenceJason Ekstrand2015-01-152-0/+12
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Make array deref direct vs. indirect an enumJason Ekstrand2015-01-158-15/+25
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Clean up nir_deref helper functionsJason Ekstrand2015-01-151-1/+4
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/lower_samplers: Use the nir_instr_rewrite_src functionJason Ekstrand2015-01-151-1/+10
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a helper for rewriting an instruction sourceJason Ekstrand2015-01-152-0/+62
| | | | Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Properly saturate multipliesJason Ekstrand2015-01-151-1/+1
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/from_ssa: Don't lower constant SSA values to registersJason Ekstrand2015-01-151-8/+32
| | | | | | | | | | | Backends want to be able to do special things with constant values such as put them into immediates or make decisions based on whether or not a value is constant. Before, constants always got lowered to a load_const into a register and then a register use. Now we leave constants as SSA values so backends can special-case them if they want. Since handling constant SSA values is trivial, this shouldn't be a problem for backends. Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Handle SSA constantsJason Ekstrand2015-01-151-17/+33
| | | | Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Use an array rather than a hash table for register lookupJason Ekstrand2015-01-153-23/+30
| | | | Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Add the CSE pass and actually run in a loopJason Ekstrand2015-01-151-13/+18
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a basic CSE passJason Ekstrand2015-01-153-0/+272
| | | | | | | This pass is still fairly basic. It only handles ALU operations, constant loads, and phi nodes. No texture ops or intrinsics yet. Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a fused multiply-add peepholeJason Ekstrand2015-01-155-0/+196
|
* nir: Validate that the SSA def and register indices are uniqueJason Ekstrand2015-01-151-0/+41
| | | | Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Turn on the peephole select optimizationJason Ekstrand2015-01-151-0/+2
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a peephole select optimizationJason Ekstrand2015-01-153-0/+217
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/nir: Patch up phi predecessors in move_successorsJason Ekstrand2015-01-151-2/+23
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/nir: Use safe iterators when iterating over the CFGJason Ekstrand2015-01-151-8/+10
| | | | Reviewed-by: Connor Abbott <[email protected]>
* glsl/list: Add a foreach_list_typed_safe_reverse macroJason Ekstrand2015-01-151-0/+9
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir/nir: Fix a bug in move_successorsJason Ekstrand2015-01-151-1/+2
| | | | | | | | The unlink_blocks function moves successors around to make sure that, if there is a remaining successor, it is in the first successors slot and not the second. To fix this, we simply get both successors up front. Reviewed-by: Connor Abbott <[email protected]>
* i965/fs_nir: Validate optimization passesJason Ekstrand2015-01-151-8/+15
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Differentiate between signed and unsigned versions of find_msbJason Ekstrand2015-01-153-11/+30
| | | | | | | | | | | We also make the return types match GLSL. The GLSL spec specifies that findMSB and findLSB return a signed integer. Previously, nir had them return unsigned. This updates nir's behavior to match what GLSL expects. We also update the nir-to-fs generator to take the new instructions. While we're at it, we fix the case where the input to findMSB is zero. Reviewed-by: Connor Abbott <[email protected]>
* nir/print: Don't reindex thingsJason Ekstrand2015-01-151-4/+0
| | | | | | | These indices should now be reasonably stable/consistent. Redoing the indices in the print functions makes it harder to debug problems. Reviewed-by: Connor Abbott <[email protected]>
* nir: Validate all lists in the validatorJason Ekstrand2015-01-151-0/+14
| | | | Reviewed-by: Connor Abbott <[email protected]>
* glsl/list: Fix the exec_list_validate functionJason Ekstrand2015-01-151-3/+1
| | | | | | | | | | Some time while refactoring things to make it look nicer before pushing to master, I completely broke the function. This fixes it to be correct. Just goes to show you why you souldn't push code that has no users yet... Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs_nir: Do retyping for ALU srouces in get_nir_alu_srcJason Ekstrand2015-01-151-15/+8
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a better out-of-SSA passJason Ekstrand2015-01-151-73/+716
| | | | | | | | | This commit rewrites the out-of-SSA pass to not be nearly as naieve. It's based on "Revisiting Out-of-SSA Translation for Correctness, Code Quality, and Efficiency" by Boissinot et. al. It should be fairly close to state-of-the art. Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a function for comparing two sourcesJason Ekstrand2015-01-152-0/+29
| | | | Reviewed-by: Connor Abbott <[email protected]>