summaryrefslogtreecommitdiffstats
path: root/src/video_core/pica.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2015-12-02 19:23:51 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-06-28 06:14:13 +0200
commitf9be06b15f08cb559580e1d19b43158640a37d67 (patch)
tree9b20e75d7ef02e0feac2be0cb96843ebbb6814f8 /src/video_core/pica.h
parentMerge pull request #1930 from scurest/superfluous-moves (diff)
downloadyuzu-f9be06b15f08cb559580e1d19b43158640a37d67.tar
yuzu-f9be06b15f08cb559580e1d19b43158640a37d67.tar.gz
yuzu-f9be06b15f08cb559580e1d19b43158640a37d67.tar.bz2
yuzu-f9be06b15f08cb559580e1d19b43158640a37d67.tar.lz
yuzu-f9be06b15f08cb559580e1d19b43158640a37d67.tar.xz
yuzu-f9be06b15f08cb559580e1d19b43158640a37d67.tar.zst
yuzu-f9be06b15f08cb559580e1d19b43158640a37d67.zip
Diffstat (limited to 'src/video_core/pica.h')
-rw-r--r--src/video_core/pica.h32
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);