diff options
author | bunnei <bunneidev@gmail.com> | 2018-07-13 04:57:57 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-07-13 04:57:57 +0200 |
commit | 8aeff9cf8e84c27ab83cea8df1a94ce8082efc78 (patch) | |
tree | e79cdf86838e120908b50fd25ad4f48a98bc29e9 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | gl_shader_gen: Implement dual vertex shader mode. (diff) | |
download | yuzu-8aeff9cf8e84c27ab83cea8df1a94ce8082efc78.tar yuzu-8aeff9cf8e84c27ab83cea8df1a94ce8082efc78.tar.gz yuzu-8aeff9cf8e84c27ab83cea8df1a94ce8082efc78.tar.bz2 yuzu-8aeff9cf8e84c27ab83cea8df1a94ce8082efc78.tar.lz yuzu-8aeff9cf8e84c27ab83cea8df1a94ce8082efc78.tar.xz yuzu-8aeff9cf8e84c27ab83cea8df1a94ce8082efc78.tar.zst yuzu-8aeff9cf8e84c27ab83cea8df1a94ce8082efc78.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 02ffd9bde..4072a12b4 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -216,15 +216,13 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { auto& shader_config = gpu.regs.shader_config[index]; const Maxwell::ShaderProgram program{static_cast<Maxwell::ShaderProgram>(index)}; - const size_t stage{index == 0 ? 0 : 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) { + if (!gpu.regs.IsShaderConfigEnabled(index)) { continue; } + const size_t stage{index == 0 ? 0 : index - 1}; // Stage indices are 0 - 5 + GLShader::MaxwellUniformData ubo{}; ubo.SetFromRegs(gpu.state.shader_stages[stage]); std::memcpy(buffer_ptr, &ubo, sizeof(ubo)); @@ -628,9 +626,6 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr auto& gpu = Core::System::GetInstance().GPU(); auto& maxwell3d = gpu.Get3DEngine(); - ASSERT_MSG(maxwell3d.IsShaderStageEnabled(stage), - "Attempted to upload constbuffer of disabled shader stage"); - // Reset all buffer draw state for this stage. for (auto& buffer : state.draw.const_buffers[static_cast<size_t>(stage)]) { buffer.bindpoint = 0; @@ -697,9 +692,6 @@ u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, GLuint program, auto& gpu = Core::System::GetInstance().GPU(); auto& maxwell3d = gpu.Get3DEngine(); - ASSERT_MSG(maxwell3d.IsShaderStageEnabled(stage), - "Attempted to upload textures of disabled shader stage"); - ASSERT_MSG(current_unit + entries.size() <= std::size(state.texture_units), "Exceeded the number of active textures."); |