Commit 74591720 by Ben Clayton

Reactor: Add swizzle op for UInt4.

This missing op causes horrible template errors when attempting to use UInt4 swizzles. Change-Id: I02f9381c1d4da45b1fc32e53ad9c7fd248e21673 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31273 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
parent 7e01e4e0
...@@ -3648,6 +3648,11 @@ namespace rr ...@@ -3648,6 +3648,11 @@ namespace rr
return RValue<UInt4>(Nucleus::createInsertElement(x.value, element.value, i)); return RValue<UInt4>(Nucleus::createInsertElement(x.value, element.value, i));
} }
RValue<UInt4> Swizzle(RValue<UInt4> x, unsigned char select)
{
return RValue<UInt4>(createSwizzle4(x.value, select));
}
Half::Half(RValue<Float> cast) Half::Half(RValue<Float> cast)
{ {
UInt fp32i = As<UInt>(cast); UInt fp32i = As<UInt>(cast);
......
...@@ -2027,6 +2027,7 @@ namespace rr ...@@ -2027,6 +2027,7 @@ namespace rr
RValue<UInt> Extract(RValue<UInt4> val, int i); RValue<UInt> Extract(RValue<UInt4> val, int i);
RValue<UInt4> Insert(RValue<UInt4> val, RValue<UInt> element, int i); RValue<UInt4> Insert(RValue<UInt4> val, RValue<UInt> element, int i);
// RValue<UInt4> RoundInt(RValue<Float4> cast); // RValue<UInt4> RoundInt(RValue<Float4> cast);
RValue<UInt4> Swizzle(RValue<UInt4> x, unsigned char select);
class Half : public LValue<Half> class Half : public LValue<Half>
{ {
......
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