diff options
author | Mat M <mathew1800@gmail.com> | 2018-03-20 04:37:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-20 04:37:47 +0100 |
commit | f4700ccabff57955a43c8eb0df85c0c02b1b9724 (patch) | |
tree | 95128517868efff970816e6d9aee6f73eaf638bc | |
parent | Merge pull request #252 from N00byKing/3064 (diff) | |
parent | GPU: Added Z buffer registers to Maxwell3D's reg structure. (diff) | |
download | yuzu-f4700ccabff57955a43c8eb0df85c0c02b1b9724.tar yuzu-f4700ccabff57955a43c8eb0df85c0c02b1b9724.tar.gz yuzu-f4700ccabff57955a43c8eb0df85c0c02b1b9724.tar.bz2 yuzu-f4700ccabff57955a43c8eb0df85c0c02b1b9724.tar.lz yuzu-f4700ccabff57955a43c8eb0df85c0c02b1b9724.tar.xz yuzu-f4700ccabff57955a43c8eb0df85c0c02b1b9724.tar.zst yuzu-f4700ccabff57955a43c8eb0df85c0c02b1b9724.zip |
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 096679162..c2db3154a 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -31,6 +31,7 @@ public: struct Regs { static constexpr size_t NUM_REGS = 0xE36; + static constexpr size_t NumRenderTargets = 8; static constexpr size_t NumCBData = 16; static constexpr size_t NumVertexArrays = 32; static constexpr size_t MaxShaderProgram = 6; @@ -62,7 +63,50 @@ public: union { struct { - INSERT_PADDING_WORDS(0x557); + INSERT_PADDING_WORDS(0x200); + + struct { + u32 address_high; + u32 address_low; + u32 horiz; + u32 vert; + u32 format; + u32 block_dimensions; + u32 array_mode; + u32 layer_stride; + u32 base_layer; + INSERT_PADDING_WORDS(7); + + GPUVAddr Address() const { + return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | + address_low); + } + } rt[NumRenderTargets]; + + INSERT_PADDING_WORDS(0x178); + + struct { + u32 address_high; + u32 address_low; + u32 format; + u32 block_dimensions; + u32 layer_stride; + + GPUVAddr Address() const { + return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | + address_low); + } + } zeta; + + INSERT_PADDING_WORDS(0x8A); + + struct { + union { + BitField<0, 4, u32> count; + }; + } rt_control; + + INSERT_PADDING_WORDS(0xCF); struct { u32 tsc_address_high; @@ -291,6 +335,9 @@ private: static_assert(offsetof(Maxwell3D::Regs, field_name) == position * 4, \ "Field " #field_name " has invalid position") +ASSERT_REG_POSITION(rt, 0x200); +ASSERT_REG_POSITION(zeta, 0x3F8); +ASSERT_REG_POSITION(rt_control, 0x487); ASSERT_REG_POSITION(tsc, 0x557); ASSERT_REG_POSITION(tic, 0x55D); ASSERT_REG_POSITION(code_address, 0x582); |