summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2010-09-27 05:16:11 +0000
committerShawn Hoffman <godisgovernment@gmail.com>2010-09-27 05:16:11 +0000
commit73f4bc45980398ee8244f4e5ad20ec538da6e814 (patch)
tree1112b8a240e3904e0681b35f2edb902a84b29cb9 /Source/Core/VideoCommon
parent986939f31aa268731a572a636d3fb2f9c0f868de (diff)
Some more cleanup which should've been in r6232. Thanks Billiard.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6234 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/BPMemory.h44
-rw-r--r--Source/Core/VideoCommon/Src/CPMemory.h116
-rw-r--r--Source/Core/VideoCommon/Src/PixelEngine.cpp50
3 files changed, 105 insertions, 105 deletions
diff --git a/Source/Core/VideoCommon/Src/BPMemory.h b/Source/Core/VideoCommon/Src/BPMemory.h
index ad810aa6e0..0fa4f1cdfc 100644
--- a/Source/Core/VideoCommon/Src/BPMemory.h
+++ b/Source/Core/VideoCommon/Src/BPMemory.h
@@ -280,17 +280,17 @@ struct TevStageCombiner
{
struct //abc=8bit,d=10bit
{
- unsigned d : 4; // TEVSELCC_X
- unsigned c : 4; // TEVSELCC_X
- unsigned b : 4; // TEVSELCC_X
- unsigned a : 4; // TEVSELCC_X
+ u32 d : 4; // TEVSELCC_X
+ u32 c : 4; // TEVSELCC_X
+ u32 b : 4; // TEVSELCC_X
+ u32 a : 4; // TEVSELCC_X
- unsigned bias : 2;
- unsigned op : 1;
- unsigned clamp : 1;
+ u32 bias : 2;
+ u32 op : 1;
+ u32 clamp : 1;
- unsigned shift : 2;
- unsigned dest : 2; //1,2,3
+ u32 shift : 2;
+ u32 dest : 2; //1,2,3
};
u32 hex;
@@ -299,19 +299,19 @@ struct TevStageCombiner
{
struct
{
- unsigned rswap : 2;
- unsigned tswap : 2;
- unsigned d : 3; // TEVSELCA_
- unsigned c : 3; // TEVSELCA_
- unsigned b : 3; // TEVSELCA_
- unsigned a : 3; // TEVSELCA_
-
- unsigned bias : 2; //GXTevBias
- unsigned op : 1;
- unsigned clamp : 1;
-
- unsigned shift : 2;
- unsigned dest : 2; //1,2,3
+ u32 rswap : 2;
+ u32 tswap : 2;
+ u32 d : 3; // TEVSELCA_
+ u32 c : 3; // TEVSELCA_
+ u32 b : 3; // TEVSELCA_
+ u32 a : 3; // TEVSELCA_
+
+ u32 bias : 2; //GXTevBias
+ u32 op : 1;
+ u32 clamp : 1;
+
+ u32 shift : 2;
+ u32 dest : 2; //1,2,3
};
u32 hex;
};
diff --git a/Source/Core/VideoCommon/Src/CPMemory.h b/Source/Core/VideoCommon/Src/CPMemory.h
index bb5b5e0b7e..c7de2afc6d 100644
--- a/Source/Core/VideoCommon/Src/CPMemory.h
+++ b/Source/Core/VideoCommon/Src/CPMemory.h
@@ -73,33 +73,33 @@ union TVtxDesc
{
// 0: not present
// 1: present
- unsigned PosMatIdx : 1;
- unsigned Tex0MatIdx : 1;
- unsigned Tex1MatIdx : 1;
- unsigned Tex2MatIdx : 1;
- unsigned Tex3MatIdx : 1;
- unsigned Tex4MatIdx : 1;
- unsigned Tex5MatIdx : 1;
- unsigned Tex6MatIdx : 1;
- unsigned Tex7MatIdx : 1;
+ u32 PosMatIdx : 1;
+ u32 Tex0MatIdx : 1;
+ u32 Tex1MatIdx : 1;
+ u32 Tex2MatIdx : 1;
+ u32 Tex3MatIdx : 1;
+ u32 Tex4MatIdx : 1;
+ u32 Tex5MatIdx : 1;
+ u32 Tex6MatIdx : 1;
+ u32 Tex7MatIdx : 1;
// 00: not present
// 01: direct
// 10: 8 bit index
// 11: 16 bit index
- unsigned Position : 2;
- unsigned Normal : 2;
- unsigned Color0 : 2;
- unsigned Color1 : 2;
- unsigned Tex0Coord : 2;
- unsigned Tex1Coord : 2;
- unsigned Tex2Coord : 2;
- unsigned Tex3Coord : 2;
- unsigned Tex4Coord : 2;
- unsigned Tex5Coord : 2;
- unsigned Tex6Coord : 2;
- unsigned Tex7Coord : 2;
- unsigned :31;
+ u32 Position : 2;
+ u32 Normal : 2;
+ u32 Color0 : 2;
+ u32 Color1 : 2;
+ u32 Tex0Coord : 2;
+ u32 Tex1Coord : 2;
+ u32 Tex2Coord : 2;
+ u32 Tex3Coord : 2;
+ u32 Tex4Coord : 2;
+ u32 Tex5Coord : 2;
+ u32 Tex6Coord : 2;
+ u32 Tex7Coord : 2;
+ u32 :31;
};
struct {
u32 Hex0, Hex1;
@@ -112,25 +112,25 @@ union UVAT_group0
struct
{
// 0:8
- unsigned PosElements : 1;
- unsigned PosFormat : 3;
- unsigned PosFrac : 5;
+ u32 PosElements : 1;
+ u32 PosFormat : 3;
+ u32 PosFrac : 5;
// 9:12
- unsigned NormalElements : 1;
- unsigned NormalFormat : 3;
+ u32 NormalElements : 1;
+ u32 NormalFormat : 3;
// 13:16
- unsigned Color0Elements : 1;
- unsigned Color0Comp : 3;
+ u32 Color0Elements : 1;
+ u32 Color0Comp : 3;
// 17:20
- unsigned Color1Elements : 1;
- unsigned Color1Comp : 3;
+ u32 Color1Elements : 1;
+ u32 Color1Comp : 3;
// 21:29
- unsigned Tex0CoordElements : 1;
- unsigned Tex0CoordFormat : 3;
- unsigned Tex0Frac : 5;
+ u32 Tex0CoordElements : 1;
+ u32 Tex0CoordFormat : 3;
+ u32 Tex0Frac : 5;
// 30:31
- unsigned ByteDequant: 1;
- unsigned NormalIndex3: 1;
+ u32 ByteDequant : 1;
+ u32 NormalIndex3 : 1;
};
};
@@ -140,22 +140,22 @@ union UVAT_group1
struct
{
// 0:8
- unsigned Tex1CoordElements : 1;
- unsigned Tex1CoordFormat : 3;
- unsigned Tex1Frac : 5;
+ u32 Tex1CoordElements : 1;
+ u32 Tex1CoordFormat : 3;
+ u32 Tex1Frac : 5;
// 9:17
- unsigned Tex2CoordElements : 1;
- unsigned Tex2CoordFormat : 3;
- unsigned Tex2Frac : 5;
+ u32 Tex2CoordElements : 1;
+ u32 Tex2CoordFormat : 3;
+ u32 Tex2Frac : 5;
// 18:26
- unsigned Tex3CoordElements : 1;
- unsigned Tex3CoordFormat : 3;
- unsigned Tex3Frac : 5;
+ u32 Tex3CoordElements : 1;
+ u32 Tex3CoordFormat : 3;
+ u32 Tex3Frac : 5;
// 27:30
- unsigned Tex4CoordElements : 1;
- unsigned Tex4CoordFormat : 3;
+ u32 Tex4CoordElements : 1;
+ u32 Tex4CoordFormat : 3;
//
- unsigned : 1;
+ u32 : 1;
};
};
@@ -165,19 +165,19 @@ union UVAT_group2
struct
{
// 0:4
- unsigned Tex4Frac : 5;
+ u32 Tex4Frac : 5;
// 5:13
- unsigned Tex5CoordElements : 1;
- unsigned Tex5CoordFormat : 3;
- unsigned Tex5Frac : 5;
+ u32 Tex5CoordElements : 1;
+ u32 Tex5CoordFormat : 3;
+ u32 Tex5Frac : 5;
// 14:22
- unsigned Tex6CoordElements : 1;
- unsigned Tex6CoordFormat : 3;
- unsigned Tex6Frac : 5;
+ u32 Tex6CoordElements : 1;
+ u32 Tex6CoordFormat : 3;
+ u32 Tex6Frac : 5;
// 23:31
- unsigned Tex7CoordElements : 1;
- unsigned Tex7CoordFormat : 3;
- unsigned Tex7Frac : 5;
+ u32 Tex7CoordElements : 1;
+ u32 Tex7CoordFormat : 3;
+ u32 Tex7Frac : 5;
};
};
diff --git a/Source/Core/VideoCommon/Src/PixelEngine.cpp b/Source/Core/VideoCommon/Src/PixelEngine.cpp
index 06ceeef88e..2785d66826 100644
--- a/Source/Core/VideoCommon/Src/PixelEngine.cpp
+++ b/Source/Core/VideoCommon/Src/PixelEngine.cpp
@@ -36,10 +36,10 @@ union UPEZConfReg
u16 Hex;
struct
{
- unsigned ZCompEnable : 1; // Z Comparator Enable
- unsigned Function : 3;
- unsigned ZUpdEnable : 1;
- unsigned : 11;
+ u16 ZCompEnable : 1; // Z Comparator Enable
+ u16 Function : 3;
+ u16 ZUpdEnable : 1;
+ u16 : 11;
};
};
@@ -48,15 +48,15 @@ union UPEAlphaConfReg
u16 Hex;
struct
{
- unsigned BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
- unsigned BMLogic : 1; // GX_BM_LOGIC
- unsigned Dither : 1;
- unsigned ColorUpdEnable : 1;
- unsigned AlphaUpdEnable : 1;
- unsigned DstFactor : 3;
- unsigned SrcFactor : 3;
- unsigned Substract : 1; // Additive mode by default
- unsigned BlendOperator : 4;
+ u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
+ u16 BMLogic : 1; // GX_BM_LOGIC
+ u16 Dither : 1;
+ u16 ColorUpdEnable : 1;
+ u16 AlphaUpdEnable : 1;
+ u16 DstFactor : 3;
+ u16 SrcFactor : 3;
+ u16 Substract : 1; // Additive mode by default
+ u16 BlendOperator : 4;
};
};
@@ -65,9 +65,9 @@ union UPEDstAlphaConfReg
u16 Hex;
struct
{
- unsigned DstAlpha : 8;
- unsigned Enable : 1;
- unsigned : 7;
+ u16 DstAlpha : 8;
+ u16 Enable : 1;
+ u16 : 7;
};
};
@@ -76,8 +76,8 @@ union UPEAlphaModeConfReg
u16 Hex;
struct
{
- unsigned Threshold : 8;
- unsigned CompareMode : 8;
+ u16 Threshold : 8;
+ u16 CompareMode : 8;
};
};
@@ -87,8 +87,8 @@ union UPEAlphaReadReg
u16 Hex;
struct
{
- unsigned ReadMode : 3;
- unsigned : 13;
+ u16 ReadMode : 3;
+ u16 : 13;
};
};
@@ -97,11 +97,11 @@ union UPECtrlReg
{
struct
{
- unsigned PETokenEnable : 1;
- unsigned PEFinishEnable : 1;
- unsigned PEToken : 1; // write only
- unsigned PEFinish : 1; // write only
- unsigned : 12;
+ u16 PETokenEnable : 1;
+ u16 PEFinishEnable : 1;
+ u16 PEToken : 1; // write only
+ u16 PEFinish : 1; // write only
+ u16 : 12;
};
u16 Hex;
UPECtrlReg() {Hex = 0; }