diff options
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 22 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 6 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 70fb54507..44850d193 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -450,6 +450,8 @@ void RasterizerOpenGL::DrawArrays() { | |||
| 450 | SyncBlendState(); | 450 | SyncBlendState(); |
| 451 | SyncLogicOpState(); | 451 | SyncLogicOpState(); |
| 452 | SyncCullMode(); | 452 | SyncCullMode(); |
| 453 | SyncAlphaTest(); | ||
| 454 | SyncTransformFeedback(); | ||
| 453 | 455 | ||
| 454 | // TODO(bunnei): Sync framebuffer_scale uniform here | 456 | // TODO(bunnei): Sync framebuffer_scale uniform here |
| 455 | // TODO(bunnei): Sync scissorbox uniform(s) here | 457 | // TODO(bunnei): Sync scissorbox uniform(s) here |
| @@ -883,4 +885,24 @@ void RasterizerOpenGL::SyncLogicOpState() { | |||
| 883 | state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation); | 885 | state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation); |
| 884 | } | 886 | } |
| 885 | 887 | ||
| 888 | void RasterizerOpenGL::SyncAlphaTest() { | ||
| 889 | const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; | ||
| 890 | |||
| 891 | // TODO(Rodrigo): Alpha testing is a legacy OpenGL feature, but it can be | ||
| 892 | // implemented with a test+discard in fragment shaders. | ||
| 893 | if (regs.alpha_test_enabled != 0) { | ||
| 894 | LOG_CRITICAL(Render_OpenGL, "Alpha testing is not implemented"); | ||
| 895 | UNREACHABLE(); | ||
| 896 | } | ||
| 897 | } | ||
| 898 | |||
| 899 | void RasterizerOpenGL::SyncTransformFeedback() { | ||
| 900 | const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; | ||
| 901 | |||
| 902 | if (regs.tfb_enabled != 0) { | ||
| 903 | LOG_CRITICAL(Render_OpenGL, "Transform feedbacks are not implemented"); | ||
| 904 | UNREACHABLE(); | ||
| 905 | } | ||
| 906 | } | ||
| 907 | |||
| 886 | } // namespace OpenGL | 908 | } // namespace OpenGL |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index bf9560bdc..c3f1e14bf 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h | |||
| @@ -158,6 +158,12 @@ private: | |||
| 158 | /// Syncs the LogicOp state to match the guest state | 158 | /// Syncs the LogicOp state to match the guest state |
| 159 | void SyncLogicOpState(); | 159 | void SyncLogicOpState(); |
| 160 | 160 | ||
| 161 | /// Syncs the alpha test state to match the guest state | ||
| 162 | void SyncAlphaTest(); | ||
| 163 | |||
| 164 | /// Syncs the transform feedback state to match the guest state | ||
| 165 | void SyncTransformFeedback(); | ||
| 166 | |||
| 161 | bool has_ARB_direct_state_access = false; | 167 | bool has_ARB_direct_state_access = false; |
| 162 | bool has_ARB_multi_bind = false; | 168 | bool has_ARB_multi_bind = false; |
| 163 | bool has_ARB_separate_shader_objects = false; | 169 | bool has_ARB_separate_shader_objects = false; |