diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-04 22:49:48 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-04 22:50:59 +0200 |
commit | 9b8e9623683da728f98019b096517704eb946d21 (patch) | |
tree | a8077ca5fa5bafbe63d09b0a92ebe8a2557232e5 /src | |
parent | Merge pull request #3843 from ogniK5377/GetPopFromGeneralChannelEvent (diff) | |
download | yuzu-9b8e9623683da728f98019b096517704eb946d21.tar yuzu-9b8e9623683da728f98019b096517704eb946d21.tar.gz yuzu-9b8e9623683da728f98019b096517704eb946d21.tar.bz2 yuzu-9b8e9623683da728f98019b096517704eb946d21.tar.lz yuzu-9b8e9623683da728f98019b096517704eb946d21.tar.xz yuzu-9b8e9623683da728f98019b096517704eb946d21.tar.zst yuzu-9b8e9623683da728f98019b096517704eb946d21.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 6 | ||||
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 19 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 7db055ea0..8155f6e2e 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -44,6 +44,12 @@ void Maxwell3D::InitializeRegisterDefaults() { viewport.depth_range_near = 0.0f; viewport.depth_range_far = 1.0f; } + for (auto& viewport : regs.viewport_transform) { + viewport.swizzle.x.Assign(Regs::ViewportSwizzle::PositiveX); + viewport.swizzle.y.Assign(Regs::ViewportSwizzle::PositiveY); + viewport.swizzle.z.Assign(Regs::ViewportSwizzle::PositiveZ); + viewport.swizzle.w.Assign(Regs::ViewportSwizzle::PositiveW); + } // Doom and Bomberman seems to use the uninitialized registers and just enable blend // so initialize blend registers with sane values diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 864924ff3..4aeff4cc9 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -575,6 +575,17 @@ public: Replay = 3, }; + enum class ViewportSwizzle : u32 { + PositiveX = 0, + NegativeX = 1, + PositiveY = 2, + NegativeY = 3, + PositiveZ = 4, + NegativeZ = 5, + PositiveW = 6, + NegativeW = 7, + }; + struct RenderTargetConfig { u32 address_high; u32 address_low; @@ -618,7 +629,13 @@ public: f32 translate_x; f32 translate_y; f32 translate_z; - INSERT_UNION_PADDING_WORDS(2); + union { + BitField<0, 3, ViewportSwizzle> x; + BitField<4, 3, ViewportSwizzle> y; + BitField<8, 3, ViewportSwizzle> z; + BitField<12, 3, ViewportSwizzle> w; + } swizzle; + INSERT_UNION_PADDING_WORDS(1); Common::Rectangle<f32> GetRect() const { return { |