Enable Short8 and UShort8 construction from pointer dereference.
Change-Id: I09efd94974a520b790ab1d3fe9e8dc91295948f9
Reviewed-on: https://swiftshader-review.googlesource.com/5762
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Reactor/Nucleus.cpp b/src/Reactor/Nucleus.cpp
index 820bdd5..2c18dc7 100644
--- a/src/Reactor/Nucleus.cpp
+++ b/src/Reactor/Nucleus.cpp
@@ -3558,6 +3558,14 @@
storeValue(rhs.value);
}
+ Short8::Short8(const Reference<Short8> &rhs)
+ {
+ // xyzw.parent = this;
+
+ Value *value = rhs.loadValue();
+ storeValue(value);
+ }
+
Short8::Short8(RValue<Short4> lo, RValue<Short4> hi)
{
Value *loLong = Nucleus::createBitCast(lo.value, Long::getType());
@@ -3643,6 +3651,14 @@
storeValue(rhs.value);
}
+ UShort8::UShort8(const Reference<UShort8> &rhs)
+ {
+ // xyzw.parent = this;
+
+ Value *value = rhs.loadValue();
+ storeValue(value);
+ }
+
UShort8::UShort8(RValue<UShort4> lo, RValue<UShort4> hi)
{
Value *loLong = Nucleus::createBitCast(lo.value, Long::getType());
diff --git a/src/Reactor/Nucleus.hpp b/src/Reactor/Nucleus.hpp
index 90e67c9..9aa24be 100644
--- a/src/Reactor/Nucleus.hpp
+++ b/src/Reactor/Nucleus.hpp
@@ -1071,7 +1071,7 @@
Short8(short c0, short c1, short c2, short c3, short c4, short c5, short c6, short c7);
Short8(RValue<Short8> rhs);
// Short8(const Short8 &rhs);
- // Short8(const Reference<Short8> &rhs);
+ Short8(const Reference<Short8> &rhs);
Short8(RValue<Short4> lo, RValue<Short4> hi);
// RValue<Short8> operator=(RValue<Short8> rhs) const;
@@ -1128,7 +1128,7 @@
UShort8(unsigned short c0, unsigned short c1, unsigned short c2, unsigned short c3, unsigned short c4, unsigned short c5, unsigned short c6, unsigned short c7);
UShort8(RValue<UShort8> rhs);
// UShort8(const UShort8 &rhs);
- // UShort8(const Reference<UShort8> &rhs);
+ UShort8(const Reference<UShort8> &rhs);
UShort8(RValue<UShort4> lo, RValue<UShort4> hi);
RValue<UShort8> operator=(RValue<UShort8> rhs) const;