mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 21:14:00 +00:00
Change our pixel component type to be signed
This commit is contained in:
parent
3dd1444ff6
commit
cebce26be1
2 changed files with 4 additions and 4 deletions
|
@ -58,9 +58,9 @@
|
||||||
|
|
||||||
namespace FasTC {
|
namespace FasTC {
|
||||||
|
|
||||||
class Pixel : public Vector4<uint16> {
|
class Pixel : public Vector4<int16> {
|
||||||
protected:
|
protected:
|
||||||
typedef uint16 ChannelType;
|
typedef int16 ChannelType;
|
||||||
typedef Vector4<ChannelType> VectorType;
|
typedef Vector4<ChannelType> VectorType;
|
||||||
uint8 m_BitDepth[4];
|
uint8 m_BitDepth[4];
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ TEST(Pixel, FourWideConstructor) {
|
||||||
|
|
||||||
FasTC::Pixel q(static_cast<uint16>(1 << 16), 6, -2, 5, 4);
|
FasTC::Pixel q(static_cast<uint16>(1 << 16), 6, -2, 5, 4);
|
||||||
EXPECT_EQ(q.R(), 6);
|
EXPECT_EQ(q.R(), 6);
|
||||||
EXPECT_EQ(q.G(), static_cast<uint16>(-2));
|
EXPECT_EQ(q.G(), -2);
|
||||||
EXPECT_EQ(q.B(), 5);
|
EXPECT_EQ(q.B(), 5);
|
||||||
EXPECT_EQ(q.A(), 0);
|
EXPECT_EQ(q.A(), 0);
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ TEST(Pixel, ByteClamp) {
|
||||||
p.ClampByte();
|
p.ClampByte();
|
||||||
EXPECT_EQ(p.A(), 255);
|
EXPECT_EQ(p.A(), 255);
|
||||||
EXPECT_EQ(p.R(), 3);
|
EXPECT_EQ(p.R(), 3);
|
||||||
EXPECT_EQ(p.G(), 255);
|
EXPECT_EQ(p.G(), 0);
|
||||||
EXPECT_EQ(p.B(), 10);
|
EXPECT_EQ(p.B(), 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue