Commit 093be46a by Ben Clayton Committed by Ben Clayton

SpirvShader: Overload Intermediate::emplace for Int and UInt.

Removes a load of noise throughout the cpp file. Bug: b/128539387 Change-Id: Ic9fa9361c4b7dc6258833e2ce58db50b5e81b11d Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/26530Tested-by: 's avatarBen Clayton <headlessclayton@gmail.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
parent 19f1db6e
...@@ -94,6 +94,10 @@ namespace sw ...@@ -94,6 +94,10 @@ namespace sw
new (&contents[n]) Scalar(value); new (&contents[n]) Scalar(value);
} }
// Emplace with cast helpers.
void emplace(uint32_t n, const RValue<SIMD::Int>& value) { emplace(n, As<SIMD::Float>(value)); }
void emplace(uint32_t n, const RValue<SIMD::UInt>& value) { emplace(n, As<SIMD::Float>(value)); }
Scalar const & operator[](uint32_t n) const Scalar const & operator[](uint32_t n) const
{ {
ASSERT(n < size); ASSERT(n < size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment