summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.c
Commit message (Collapse)AuthorAgeFilesLines
* nir: handle doubles in nir_deref_get_const_initializer_load()Connor Abbott2016-04-111-1/+5
| | | | | | | | v2 (Sam): - Use proper bitsize value when calling to nir_load_const_instr_create() (Jason). Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add bit_size info to nir_load_const_instr_create()Samuel Iglesias Gonsálvez2016-04-111-3/+5
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add bit_size info to nir_ssa_undef_instr_create()Samuel Iglesias Gonsálvez2016-04-111-2/+4
| | | | | | | | v2: - Make the users to give the right bit_sizes as arguments (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Add a function for comparing cursorsJason Ekstrand2016-03-241-0/+56
| | | | Reviewed-by: Jordan Justen <[email protected]>
* nir: fix dangling ssadef->name ptrsRob Clark2016-03-241-1/+3
| | | | | | | | | | | | | | | | | In many places, the convention is to pass an existing ssadef name ptr when construction/initializing a new nir_ssa_def. But that goes badly (as noticed by garbage in nir_print output) when the original string gets freed. Just use ralloc_strdup() instead, and add ralloc_free() in the two places that would care (not that the strings wouldn't eventually get freed anyways). Also fixup the nir_search code which was directly setting ssadef->name to use the parent instruction as memctx. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add a bit_size parameter to nir_ssa_dest_initConnor Abbott2016-03-171-6/+8
| | | | | | | | | | | | | | | | | | | | | | v2: Squash multiple commits addressing the new parameter in different files so we don't break the build (Iago) v3: Fix tgsi (Samuel) v4: Fix nir_clone.c (Samuel) v5: Fix vc4 and freedreno (Iago) v6 (Sam) - Fix build errors in nir_lower_indirect_derefs - Use helper to get type size from nir_alu_type. Signed-off-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: rename nir_const_value fields to include bitsize informationIago Toral Quiroga2016-03-171-2/+2
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* nir: Add a bit_size to nir_register and nir_ssa_defJason Ekstrand2016-03-171-0/+2
| | | | | | | | | | | | | | | | | | | | | This really hacky commit adds a bit size to registers and SSA values. It also adds rules in the validator to validate that they do the right things. It's still an open question as to whether or not we want a bit_size in nir_alu_instr or if we just want to let it inherit from the destination. I'm inclined to just let it inherit from the destination. A similar question needs to be asked about intrinsics. v2 (Connor): - Relax validation: comparisons have explicit destination sizes and implicit source sizes. v3 (Sam): - Use helpers to get size and base types of nir_alu_type enum. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: Add support for lowering load/stores of shared variablesJordan Justen2016-03-171-0/+1
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Add compute shader shared variable storage classJordan Justen2016-03-171-0/+6
| | | | | | | | | Previously we were receiving shared variable accesses via a lowered intrinsic function from glsl. This change allows us to send in variables instead. For example, when converting from SPIR-V. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Create function parameters in function_impl_createJason Ekstrand2016-03-121-0/+20
| | | | Reviewed-by: Jordan Justen <[email protected]>
* nir: Add a helper for creating a "bare" nir_function_implJason Ekstrand2016-03-121-10/+18
| | | | Reviewed-by: Jordan Justen <[email protected]>
* nir: Add a new "param" variable mode for parameters and return variablesJason Ekstrand2016-03-121-0/+4
| | | | Reviewed-by: Jordan Justen <[email protected]>
* nir: Separate texture from sampler in nir_tex_instrJason Ekstrand2016-02-091-0/+7
| | | | | | | | | | | | | This commit adds the capability to NIR to support separate textures and samplers. As it currently stands, glsl_to_nir only sets the texture deref and leaves the sampler deref alone as it did before and nir_lower_samplers assumes this. Backends can still assume that they are combined and only look at only at the texture index. Or, if they wish, they can assume that they are separate because nir_lower_samplers, tgsi_to_nir, and prog_to_nir all set both texture and sampler index whenever a sampler is required (the two indices are the same in this case). Reviewed-by: Kenneth Graunke <[email protected]>
* nir/tex_instr: Rename sampler to textureJason Ekstrand2016-02-091-5/+5
| | | | | | | | | We're about to separate the two concepts. When we do, the sampler will become optional. Doing a rename first makes the separation a bit more safe because drivers that depend on GLSL or TGSI behaviour will be fine to just use the texture index all the time. Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Add some braces around loops and ifsJason Ekstrand2016-02-091-5/+10
|
* nir: move to compiler/Emil Velikov2016-01-261-0/+1665
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>