Commit Graph

6 Commits

Author SHA1 Message Date
Jason Ekstrand 514507825c nir/spirv: Improve handling of variable loads and copies
Before we were asuming that a deref would either be something in a block or
something that we could pass off to NIR directly.  However, it is possible
that someone would choose to load/store/copy a split structure all in one
go.  We need to be able to handle that.
2016-01-21 16:20:39 -08:00
Jason Ekstrand 7e5e64c8a9 nir/spirv: Make vectors a proper array time with an array_element
This makes dealing with single-component derefs easier
2016-01-21 16:20:39 -08:00
Jason Ekstrand a8af0f536c nir/spirv: Rework access chains a bit to allow for literals
This makes them much easier to construct because you can also just specify
a literal number and it doesn't have to be a valid SPIR-V id.
2016-01-21 16:20:39 -08:00
Jason Ekstrand 5d9a6fd526 vtn/variables: Compact local loads/stores into one function
This is similar to what we did for block loads/stores.
2016-01-21 16:20:39 -08:00
Jason Ekstrand b298743d7b nir/spirv: Add an actual variable struct to spirv_to_nir
This allows us, among other things, to do structure splitting on-the-fly to
more correctly handle input/output structs.
2016-01-21 16:20:39 -08:00
Jason Ekstrand 2892693d56 nir/spirv: Split variable handling out into its own file
It's 1300 lines all by itself and it will only grow.
2016-01-21 16:20:39 -08:00