diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-12-28 14:33:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-28 14:33:53 -0400 |
commit | f846e3d6d0e973485a53bb87b913059060dcfdbc (patch) | |
tree | 03290de133397ceb727443865ef91a9e30f3093e /src | |
parent | 8a76f816a4586444903180f12a0408a1ae82a82d (diff) | |
parent | 5b989f189fbf30535f5509a2157dc755fcb4d8f0 (diff) |
Merge pull request #3250 from ReinUsesLisp/empty-fragment
gl_rasterizer: Allow rendering without fragment shader
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 3 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_manager.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index dbb08dd809..6720511026 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -271,6 +271,9 @@ void RasterizerOpenGL::SetupShaders(GLenum primitive_mode) { case Maxwell::ShaderProgram::Geometry: shader_program_manager->UseTrivialGeometryShader(); break; + case Maxwell::ShaderProgram::Fragment: + shader_program_manager->UseTrivialFragmentShader(); + break; default: break; } diff --git a/src/video_core/renderer_opengl/gl_shader_manager.h b/src/video_core/renderer_opengl/gl_shader_manager.h index 3703e7018d..478c165ce9 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.h +++ b/src/video_core/renderer_opengl/gl_shader_manager.h @@ -50,6 +50,10 @@ public: current_state.geometry_shader = 0; } + void UseTrivialFragmentShader() { + current_state.fragment_shader = 0; + } + private: struct PipelineState { bool operator==(const PipelineState& rhs) const { |