diff options
| author | bunnei <bunneidev@gmail.com> | 2016-05-10 23:00:40 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2016-05-10 23:00:40 -0400 |
| commit | 86ecbdfa4de5654fb1f3e998921af8db1d5373cf (patch) | |
| tree | a1fa859a3e2a8183eb7b3d367c41aa91a747b39f /src/video_core/pica.h | |
| parent | feecc76333c56e42b9de590bef14e9e9872fbc5d (diff) | |
| parent | fc9cc21024bff71d98e0106c9d0fd0476ab3c17e (diff) | |
Merge pull request #1621 from JayFoxRox/w-buffer
Implement W-buffer and fix depth-mapping
Diffstat (limited to 'src/video_core/pica.h')
| -rw-r--r-- | src/video_core/pica.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h index 5891fb72a..a81a7b984 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -70,7 +70,7 @@ struct Regs { INSERT_PADDING_WORDS(0x9); BitField<0, 24, u32> viewport_depth_range; // float24 - BitField<0, 24, u32> viewport_depth_far_plane; // float24 + BitField<0, 24, u32> viewport_depth_near_plane; // float24 BitField<0, 3, u32> vs_output_total; @@ -122,7 +122,20 @@ struct Regs { BitField<16, 10, s32> y; } viewport_corner; - INSERT_PADDING_WORDS(0x17); + INSERT_PADDING_WORDS(0x1); + + //TODO: early depth + INSERT_PADDING_WORDS(0x1); + + INSERT_PADDING_WORDS(0x2); + + enum DepthBuffering : u32 { + WBuffering = 0, + ZBuffering = 1, + }; + BitField< 0, 1, DepthBuffering> depthmap_enable; + + INSERT_PADDING_WORDS(0x12); struct TextureConfig { enum WrapMode : u32 { @@ -1279,10 +1292,11 @@ ASSERT_REG_POSITION(cull_mode, 0x40); ASSERT_REG_POSITION(viewport_size_x, 0x41); ASSERT_REG_POSITION(viewport_size_y, 0x43); ASSERT_REG_POSITION(viewport_depth_range, 0x4d); -ASSERT_REG_POSITION(viewport_depth_far_plane, 0x4e); +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(viewport_corner, 0x68); +ASSERT_REG_POSITION(depthmap_enable, 0x6D); ASSERT_REG_POSITION(texture0_enable, 0x80); ASSERT_REG_POSITION(texture0, 0x81); ASSERT_REG_POSITION(texture0_format, 0x8e); |
