diff options
| author | 2019-01-22 09:23:35 -0500 | |
|---|---|---|
| committer | 2019-01-22 09:23:35 -0500 | |
| commit | 0fa1ebc3495d5bf7c5e7ba08c1752a6f24a5a55c (patch) | |
| tree | 0ad83c6ebeb8bf17065fa5dee99ae40f0ac68df4 | |
| parent | Merge pull request #2035 from lioncash/fwd-decl (diff) | |
| parent | maxwell_3d: Set rt_separate_frag_data to 1 by default (diff) | |
| download | yuzu-0fa1ebc3495d5bf7c5e7ba08c1752a6f24a5a55c.tar.gz yuzu-0fa1ebc3495d5bf7c5e7ba08c1752a6f24a5a55c.tar.xz yuzu-0fa1ebc3495d5bf7c5e7ba08c1752a6f24a5a55c.zip | |
Merge pull request #2043 from ReinUsesLisp/rt-separate
maxwell_3d: Set rt_separate_frag_data to 1 by default
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index d64a5080b..a388b3944 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -37,6 +37,7 @@ void Maxwell3D::InitializeRegisterDefaults() { | |||
| 37 | regs.viewports[viewport].depth_range_near = 0.0f; | 37 | regs.viewports[viewport].depth_range_near = 0.0f; |
| 38 | regs.viewports[viewport].depth_range_far = 1.0f; | 38 | regs.viewports[viewport].depth_range_far = 1.0f; |
| 39 | } | 39 | } |
| 40 | |||
| 40 | // Doom and Bomberman seems to use the uninitialized registers and just enable blend | 41 | // Doom and Bomberman seems to use the uninitialized registers and just enable blend |
| 41 | // so initialize blend registers with sane values | 42 | // so initialize blend registers with sane values |
| 42 | regs.blend.equation_rgb = Regs::Blend::Equation::Add; | 43 | regs.blend.equation_rgb = Regs::Blend::Equation::Add; |
| @@ -66,6 +67,7 @@ void Maxwell3D::InitializeRegisterDefaults() { | |||
| 66 | regs.stencil_back_func_func = Regs::ComparisonOp::Always; | 67 | regs.stencil_back_func_func = Regs::ComparisonOp::Always; |
| 67 | regs.stencil_back_func_mask = 0xFFFFFFFF; | 68 | regs.stencil_back_func_mask = 0xFFFFFFFF; |
| 68 | regs.stencil_back_mask = 0xFFFFFFFF; | 69 | regs.stencil_back_mask = 0xFFFFFFFF; |
| 70 | |||
| 69 | // TODO(Rodrigo): Most games do not set a point size. I think this is a case of a | 71 | // 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). | 72 | // register carrying a default value. Assume it's OpenGL's default (1). |
| 71 | regs.point_size = 1.0f; | 73 | regs.point_size = 1.0f; |
| @@ -78,6 +80,9 @@ void Maxwell3D::InitializeRegisterDefaults() { | |||
| 78 | regs.color_mask[color_mask].B.Assign(1); | 80 | regs.color_mask[color_mask].B.Assign(1); |
| 79 | regs.color_mask[color_mask].A.Assign(1); | 81 | regs.color_mask[color_mask].A.Assign(1); |
| 80 | } | 82 | } |
| 83 | |||
| 84 | // Commercial games seem to assume this value is enabled and nouveau sets this value manually. | ||
| 85 | regs.rt_separate_frag_data = 1; | ||
| 81 | } | 86 | } |
| 82 | 87 | ||
| 83 | void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) { | 88 | void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) { |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 2bf086902..d8e9df5db 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -509,10 +509,7 @@ void RasterizerOpenGL::ConfigureFramebuffers(OpenGLState& current_state, bool us | |||
| 509 | depth_surface = res_cache.GetDepthBufferSurface(preserve_contents); | 509 | depth_surface = res_cache.GetDepthBufferSurface(preserve_contents); |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | // TODO(bunnei): Figure out how the below register works. According to envytools, this should be | 512 | UNIMPLEMENTED_IF(regs.rt_separate_frag_data == 0); |
| 513 | // used to enable multiple render targets. However, it is left unset on all games that I have | ||
| 514 | // tested. | ||
| 515 | UNIMPLEMENTED_IF(regs.rt_separate_frag_data != 0); | ||
| 516 | 513 | ||
| 517 | // Bind the framebuffer surfaces | 514 | // Bind the framebuffer surfaces |
| 518 | current_state.framebuffer_srgb.enabled = regs.framebuffer_srgb != 0; | 515 | current_state.framebuffer_srgb.enabled = regs.framebuffer_srgb != 0; |