summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-11-20 19:57:20 -0500
committerGravatar bunnei2018-11-20 19:58:06 -0500
commit1a543723ab57a85f15013831e6ed598fc62de2a1 (patch)
treed82ee38057e71a21cc018583be071125350aff61 /src
parentMerge pull request #1734 from lioncash/shared (diff)
downloadyuzu-1a543723ab57a85f15013831e6ed598fc62de2a1.tar.gz
yuzu-1a543723ab57a85f15013831e6ed598fc62de2a1.tar.xz
yuzu-1a543723ab57a85f15013831e6ed598fc62de2a1.zip
maxwell_3d: Initialize rasterizer color mask registers as enabled.
- Fixes rendering regression with Sonic Mania.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index a04e00ecb..2bc534be3 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -69,6 +69,15 @@ void Maxwell3D::InitializeRegisterDefaults() {
69 // TODO(Rodrigo): Most games do not set a point size. I think this is a case of a 69 // TODO(Rodrigo): Most games do not set a point size. I think this is a case of a
70 // register carrying a default value. Assume it's OpenGL's default (1). 70 // register carrying a default value. Assume it's OpenGL's default (1).
71 regs.point_size = 1.0f; 71 regs.point_size = 1.0f;
72
73 // TODO(bunnei): Some games do not initialize the color masks (e.g. Sonic Mania). Assuming a
74 // default of enabled fixes rendering here.
75 for (std::size_t color_mask = 0; color_mask < Regs::NumRenderTargets; color_mask++) {
76 regs.color_mask[color_mask].R.Assign(1);
77 regs.color_mask[color_mask].G.Assign(1);
78 regs.color_mask[color_mask].B.Assign(1);
79 regs.color_mask[color_mask].A.Assign(1);
80 }
72} 81}
73 82
74void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) { 83void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) {