diff options
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 10 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_manager.cpp | 5 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_manager.h | 1 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index f75999557..65a2fd5e8 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -634,8 +634,8 @@ void RasterizerOpenGL::SamplerInfo::SyncWithConfig(const Tegra::Texture::TSCEntr u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint program, u32 current_bindpoint, const std::vector<GLShader::ConstBufferEntry>& entries) { - auto& gpu = Core::System::GetInstance().GPU(); - auto& maxwell3d = gpu.Get3DEngine(); + const auto& gpu = Core::System::GetInstance().GPU(); + const auto& maxwell3d = gpu.Maxwell3D(); // Reset all buffer draw state for this stage. for (auto& buffer : state.draw.const_buffers[static_cast<size_t>(stage)]) { @@ -644,7 +644,7 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr } // Upload only the enabled buffers from the 16 constbuffers of each shader stage - auto& shader_stage = maxwell3d.state.shader_stages[static_cast<size_t>(stage)]; + const auto& shader_stage = maxwell3d.state.shader_stages[static_cast<size_t>(stage)]; for (u32 bindpoint = 0; bindpoint < entries.size(); ++bindpoint) { const auto& used_buffer = entries[bindpoint]; @@ -700,8 +700,8 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr u32 RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, GLuint program, u32 current_unit, const std::vector<GLShader::SamplerEntry>& entries) { - auto& gpu = Core::System::GetInstance().GPU(); - auto& maxwell3d = gpu.Get3DEngine(); + const auto& gpu = Core::System::GetInstance().GPU(); + const auto& maxwell3d = gpu.Maxwell3D(); ASSERT_MSG(current_unit + entries.size() <= std::size(state.texture_units), "Exceeded the number of active textures."); diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp index 1aa437f76..e81fcbbc4 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.cpp +++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp @@ -10,8 +10,9 @@ namespace GLShader { namespace Impl { -void SetShaderUniformBlockBinding(GLuint shader, const char* name, - Maxwell3D::Regs::ShaderStage binding, size_t expected_size) { +static void SetShaderUniformBlockBinding(GLuint shader, const char* name, + Maxwell3D::Regs::ShaderStage binding, + size_t expected_size) { GLuint ub_index = glGetUniformBlockIndex(shader, name); if (ub_index != GL_INVALID_INDEX) { GLint ub_size = 0; diff --git a/src/video_core/renderer_opengl/gl_shader_manager.h b/src/video_core/renderer_opengl/gl_shader_manager.h index 4295c20a6..e29d551e1 100644 --- a/src/video_core/renderer_opengl/gl_shader_manager.h +++ b/src/video_core/renderer_opengl/gl_shader_manager.h @@ -21,7 +21,6 @@ using Tegra::Engines::Maxwell3D; namespace Impl { void SetShaderUniformBlockBindings(GLuint shader); -void SetShaderSamplerBindings(GLuint shader); } // namespace Impl /// Uniform structure for the Uniform Buffer Object, all vectors must be 16-byte aligned |