diff options
author | Subv <subv2112@gmail.com> | 2018-08-12 02:21:31 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-08-15 05:25:07 +0200 |
commit | c5284efd4f04bca05b1f5c61dce59090a7edf61e (patch) | |
tree | a4bf294444c67058812f010d01a60e44aa1c80b6 /src/video_core/renderer_opengl/gl_shader_manager.cpp | |
parent | Merge pull request #1069 from bunnei/vtx-sz (diff) | |
download | yuzu-c5284efd4f04bca05b1f5c61dce59090a7edf61e.tar yuzu-c5284efd4f04bca05b1f5c61dce59090a7edf61e.tar.gz yuzu-c5284efd4f04bca05b1f5c61dce59090a7edf61e.tar.bz2 yuzu-c5284efd4f04bca05b1f5c61dce59090a7edf61e.tar.lz yuzu-c5284efd4f04bca05b1f5c61dce59090a7edf61e.tar.xz yuzu-c5284efd4f04bca05b1f5c61dce59090a7edf61e.tar.zst yuzu-c5284efd4f04bca05b1f5c61dce59090a7edf61e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_manager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index 415d42fda..f0886caac 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp @@ -37,11 +37,16 @@ void SetShaderUniformBlockBindings(GLuint shader) { } // namespace Impl void MaxwellUniformData::SetFromRegs(const Maxwell3D::State::ShaderStageInfo& shader_stage) { - const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; + const auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); + const auto& regs = gpu.regs; + const auto& state = gpu.state; // TODO(bunnei): Support more than one viewport viewport_flip[0] = regs.viewport_transform[0].scale_x < 0.0 ? -1.0f : 1.0f; viewport_flip[1] = regs.viewport_transform[0].scale_y < 0.0 ? -1.0f : 1.0f; + + // We only assign the instance to the first component of the vector, the rest is just padding. + instance_id[0] = state.current_instance; } } // namespace GLShader |