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