Separate intermediate values from lvalues
The vast majority of values in a SPIRV program are intermediates -- they
are guaranteed written to exactly once, by the instruction which defines
them.
Initially we had treated these the same as mutable (stack) variables, but
that produces wasteful code full of loads and stores.
Instead, represent intermediate values as a bundle of RValue<Float4>,
representing an rvalue float-sized value per SIMD lane. Introduce the
new type Intermediate to hold these bundles to allow incremental
construction of the individual RValue<Float4> objects within the bundle.
Bug: b/124534397
Change-Id: Ibb663773100d017de117111705b530b092f87ea2
Reviewed-on: https://swiftshader-review.googlesource.com/c/24968Tested-by:
Chris Forbes <chrisforbes@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Showing
Please
register
or
sign in
to comment