diff options
Diffstat (limited to 'src/video_core/pica.h')
-rw-r--r-- | src/video_core/pica.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 09702d46a..065a3fd0c 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -115,7 +115,36 @@ struct Regs { BitField<24, 5, Semantic> map_w; } vs_output_attributes[7]; - INSERT_PADDING_WORDS(0x11); + INSERT_PADDING_WORDS(0xe); + + enum class ScissorMode : u32 { + Disabled = 0, + Exclude = 1, // Exclude pixels inside the scissor box + + Include = 3 // Exclude pixels outside the scissor box + }; + + struct { + BitField<0, 2, ScissorMode> mode; + + union { + BitField< 0, 16, u32> right; + BitField<16, 16, u32> bottom; + }; + + union { + BitField< 0, 16, u32> left_minus_1; + BitField<16, 16, u32> top_minus_1; + }; + + u32 GetTop() const { + return top_minus_1 + 1; + } + + u32 GetLeft() const { + return left_minus_1 + 1; + } + } scissor_test; union { BitField< 0, 10, s32> x; @@ -1328,6 +1357,7 @@ ASSERT_REG_POSITION(viewport_depth_range, 0x4d); ASSERT_REG_POSITION(viewport_depth_near_plane, 0x4e); ASSERT_REG_POSITION(vs_output_attributes[0], 0x50); ASSERT_REG_POSITION(vs_output_attributes[1], 0x51); +ASSERT_REG_POSITION(scissor_test, 0x65); ASSERT_REG_POSITION(viewport_corner, 0x68); ASSERT_REG_POSITION(depthmap_enable, 0x6D); ASSERT_REG_POSITION(texture0_enable, 0x80); |