diff options
author | Subv <subv2112@gmail.com> | 2018-04-14 18:42:07 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-04-15 05:54:23 +0200 |
commit | ae58e46036944ebadfed611b657911720383d60f (patch) | |
tree | 951caf616779423ce11f1b260701492ceb07f187 /src/video_core/renderer_opengl | |
parent | Merge pull request #332 from bunnei/fix-total-mem-usage (diff) | |
download | yuzu-ae58e46036944ebadfed611b657911720383d60f.tar yuzu-ae58e46036944ebadfed611b657911720383d60f.tar.gz yuzu-ae58e46036944ebadfed611b657911720383d60f.tar.bz2 yuzu-ae58e46036944ebadfed611b657911720383d60f.tar.lz yuzu-ae58e46036944ebadfed611b657911720383d60f.tar.xz yuzu-ae58e46036944ebadfed611b657911720383d60f.tar.zst yuzu-ae58e46036944ebadfed611b657911720383d60f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index f75d4c658..adc684f9e 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -191,8 +191,9 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset, size auto& shader_config = gpu.regs.shader_config[index]; const Maxwell::ShaderProgram program{static_cast<Maxwell::ShaderProgram>(index)}; - // VertexB program is always enabled, despite bit setting - const bool is_enabled{shader_config.enable || program == Maxwell::ShaderProgram::VertexB}; + const auto& stage = index - 1; // Stage indices are 0 - 5 + + const bool is_enabled = gpu.IsShaderStageEnabled(static_cast<Maxwell::ShaderStage>(stage)); // Skip stages that are not enabled if (!is_enabled) { @@ -200,7 +201,6 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset, size } // Upload uniform data as one UBO per stage - const auto& stage = index - 1; // Stage indices are 0 - 5 const GLintptr ubo_offset = buffer_offset + static_cast<GLintptr>(ptr_pos); copy_buffer(uniform_buffers[stage].handle, ubo_offset, sizeof(GLShader::MaxwellUniformData)); |