summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_io.c
Commit message (Collapse)AuthorAgeFilesLines
* nir/lower_io: Add a assign_locations function that sorts by [in]direct useJason Ekstrand2015-03-191-0/+71
| | | | | | | v2: Delete the set of indirectly accessed variables when we're done with it v3: Rename from _packed to _scalar Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir/lower_io: Make variable location assignment a manual operationJason Ekstrand2015-03-191-12/+2
| | | | | | | | | | Previously, we just assigned variable locations in nir_lower_io. Now, we force the user to assign variable locations for us. This gives the backend a bit more control over where variables are placed. v2: Rename from _packed to _scalar Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir: Use a list instead of a hash_table for inputs, outputs, and uniformsJason Ekstrand2015-03-191-8/+5
| | | | | | | | | | | | We never did a single hash table lookup in the entire NIR code base that I found so there was no real benifit to doing it that way. I suppose that for linking, we'll probably want to be able to lookup by name but we can leave building that hash table to the linker. In the mean time this was causing problems with GLSL IR -> NIR because GLSL IR doesn't guarantee us unique names of uniforms, etc. This was causing massive rendering isues in the unreal4 Sun Temple demo. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir: add missing GLSL_TYPE_DOUBLE case in type_size()Brian Paul2015-02-191-0/+1
| | | | | | | To silence compiler warning about unhandled switch case. v2: move GLSL_TYPE_DOUBLE to the "not reached" section, per Ilia. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nir: Use pointers for nir_src_copy and nir_dest_copyJason Ekstrand2015-01-261-4/+4
| | | | | | | | This avoids the overhead of copying structures and better matches the newly added nir_alu_src_copy and nir_alu_dest_copy. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir: Make an easier helper for setting up SSA defs.Eric Anholt2015-01-221-7/+4
| | | | | | | | Almost all instructions we nir_ssa_def_init() for are nir_dests, and you have to keep from forgetting to set is_ssa when you do. Just provide the simpler helper, instead. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* nir: Stop using designated initializersJason Ekstrand2015-01-211-7/+2
| | | | | | | | | Designated initializers with anonymous unions don't work in MSVC or GCC < 4.6. With a couple of constructor methods, we don't need them any more and the code is actually cleaner. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88467 Reviewed-by: Connor Abbot <cwabbott0@gmail.com>
* nir: Make load_const SSA-onlyJason Ekstrand2015-01-151-6/+2
| | | | | | | | As it was, we weren't ever using load_const in a non-SSA way. This allows us to substantially simplify the load_const instruction. If we ever need a non-SSA constant load, we can do a load_const and an imov. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir: Call nir_metadata_preserve more placesJason Ekstrand2015-01-151-0/+3
| | | | Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir: Add gpu_shader5 interpolation intrinsicsJason Ekstrand2015-01-151-10/+6
| | | | Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir: Vectorize intrinsicsJason Ekstrand2015-01-151-89/+26
| | | | | | | | | | 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 <cwabbott0@gmail.com>
* nir: Add a pass for lowering input/output loads/storesJason Ekstrand2015-01-151-0/+391
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>