diff options
Diffstat (limited to 'src/video_core/pica.h')
-rw-r--r-- | src/video_core/pica.h | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h index f5771ed84..2506bf78e 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -161,8 +161,8 @@ struct Regs { IA4 = 9, A4 = 11, - // TODO: Support for the other formats is not implemented, yet. - // Seems like they are luminance formats and compressed textures. + ETC1 = 12, // compressed + ETC1A4 = 13, // compressed }; static unsigned NibblesPerPixel(TextureFormat format) { @@ -310,10 +310,15 @@ struct Regs { }; struct { - enum DepthFunc : u32 { - Always = 1, - LessThan = 4, - GreaterThan = 6, + enum CompareFunc : u32 { + Never = 0, + Always = 1, + Equal = 2, + NotEqual = 3, + LessThan = 4, + LessThanOrEqual = 5, + GreaterThan = 6, + GreaterThanOrEqual = 7, }; union { @@ -327,11 +332,21 @@ struct Regs { }; enum BlendFactor : u32 { - Zero = 0, - One = 1, - - SourceAlpha = 6, - OneMinusSourceAlpha = 7, + Zero = 0, + One = 1, + SourceColor = 2, + OneMinusSourceColor = 3, + DestColor = 4, + OneMinusDestColor = 5, + SourceAlpha = 6, + OneMinusSourceAlpha = 7, + DestAlpha = 8, + OneMinusDestAlpha = 9, + ConstantColor = 10, + OneMinusConstantColor = 11, + ConstantAlpha = 12, + OneMinusConstantAlpha = 13, + SourceAlphaSaturate = 14 }; BitField< 0, 8, BlendEquation> blend_equation_rgb; @@ -352,11 +367,28 @@ struct Regs { BitField<0, 4, Op> op; } logic_op; - INSERT_PADDING_WORDS(0x4); + union { + BitField< 0, 8, u32> r; + BitField< 8, 8, u32> g; + BitField<16, 8, u32> b; + BitField<24, 8, u32> a; + } blend_const; + + union { + BitField< 0, 1, u32> enable; + BitField< 4, 3, CompareFunc> func; + BitField< 8, 8, u32> ref; + } alpha_test; + + INSERT_PADDING_WORDS(0x2); union { BitField< 0, 1, u32> depth_test_enable; - BitField< 4, 3, DepthFunc> depth_test_func; + BitField< 4, 3, CompareFunc> depth_test_func; + BitField< 8, 1, u32> red_enable; + BitField< 9, 1, u32> green_enable; + BitField<10, 1, u32> blue_enable; + BitField<11, 1, u32> alpha_enable; BitField<12, 1, u32> depth_write_enable; }; |