summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_opcodes.h
Commit message (Collapse)AuthorAgeFilesLines
* nir/opcodes: Remove the per_component info fieldJason Ekstrand2015-01-151-17/+17
| | | | | | | | | | | Originally, this field was intended for determining if the given instruction acted per-component or if it had mismatching source and destination sizes that would have to be interpreted specially. However, we can easily derive this from output_size == 0, so it's not really that useful. Also, the values we were setting in nir_opcodes.h for this field were completely bogus and it was never used. Reviewed-by: Connor Abbott <[email protected]>
* nir/opcodes: Add algebraic properties metadataJason Ekstrand2015-01-151-69/+79
| | | | | | | | | | | | | | | | | | This commit adds some algebraic properties to the metadata of each opcode in NIR. In particular, you now know, just from the metadata, if a given opcode is commutative or associative. This will be useful for algebraic transformation passes that want to be able to match a + b as well as b + a in one go. v2: Make algebraic properties all caps. This was more consistent with the intrinsics flags and seems better for flags in general. Also, the enums are now declared with (1 << n) rather then hex values. v3: fmin and fmax technically aren't commutative or associative. Things get funny when one of the arguments is a NaN. Reviewed-by: Connor Abbott <[email protected]>
* nir: Make bcsel a fully vector operationJason Ekstrand2015-01-151-3/+2
| | | | | | | | Previously, the condition was a scalar that applied to all components simultaneously. As of this commit, the condition is a vector and each component is switched seperately. Reviewed-by: Connor Abbott <[email protected]>
* nir: Add neg, abs, and sat opcodesJason Ekstrand2015-01-151-0/+5
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: Add a fused multiply-add peepholeJason Ekstrand2015-01-151-0/+1
|
* nir: Differentiate between signed and unsigned versions of find_msbJason Ekstrand2015-01-151-2/+3
| | | | | | | | | | | 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: Add fine and coarse derivative opcodesJason Ekstrand2015-01-151-0/+4
| | | | Reviewed-by: Connor Abbott <[email protected]>
* Fix what I think are a few NIR typosJason Ekstrand2015-01-151-3/+3
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: add the core datastructuresConnor Abbott2015-01-151-0/+346
This includes all the instructions, ifs, loops, functions, etc. This is similar to the information in ir.h. v2: Jason Ekstrand <[email protected]>: Include ralloc and hash_table from the util directory whitespace fixes Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-By glenn.kennard <[email protected]>