diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-19 00:10:06 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-19 00:18:27 +0200 |
commit | 3a4841e40302d50b21064be7bc248b249ac88467 (patch) | |
tree | a63c0f3686216645ffd3fc40f069b68c42f4423f /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Merge pull request #681 from lioncash/const (diff) | |
download | yuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar yuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar.gz yuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar.bz2 yuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar.lz yuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar.xz yuzu-3a4841e40302d50b21064be7bc248b249ac88467.tar.zst yuzu-3a4841e40302d50b21064be7bc248b249ac88467.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index eecbc5ff0..7e620584f 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -128,8 +128,8 @@ RasterizerOpenGL::~RasterizerOpenGL() { std::pair<u8*, GLintptr> RasterizerOpenGL::SetupVertexArrays(u8* array_ptr, GLintptr buffer_offset) { MICROPROFILE_SCOPE(OpenGL_VAO); - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; - const auto& memory_manager = Core::System().GetInstance().GPU().memory_manager; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; + const auto& memory_manager = Core::System::GetInstance().GPU().memory_manager; state.draw.vertex_array = hw_vao.handle; state.draw.vertex_buffer = stream_buffer->GetHandle(); @@ -184,7 +184,7 @@ std::pair<u8*, GLintptr> RasterizerOpenGL::SetupVertexArrays(u8* array_ptr, } static GLShader::ProgramCode GetShaderProgramCode(Maxwell::ShaderProgram program) { - auto& gpu = Core::System().GetInstance().GPU().Maxwell3D(); + auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); // Fetch program code from memory GLShader::ProgramCode program_code; @@ -207,7 +207,7 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { } }; - auto& gpu = Core::System().GetInstance().GPU().Maxwell3D(); + auto& gpu = Core::System::GetInstance().GPU().Maxwell3D(); // Next available bindpoints to use when uploading the const buffers and textures to the GLSL // shaders. The constbuffer bindpoint starts after the shader stage configuration bind points. @@ -297,7 +297,7 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) { } size_t RasterizerOpenGL::CalculateVertexArraysSize() const { - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; size_t size = 0; for (u32 index = 0; index < Maxwell::NumVertexArrays; ++index) { @@ -322,7 +322,7 @@ bool RasterizerOpenGL::AccelerateDrawBatch(bool is_indexed) { std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_color_fb, bool using_depth_fb) { - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; // TODO(bunnei): Implement this const bool has_stencil = false; @@ -374,7 +374,7 @@ std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_c } void RasterizerOpenGL::Clear() { - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; bool use_color_fb = false; bool use_depth_fb = false; @@ -426,7 +426,7 @@ void RasterizerOpenGL::DrawArrays() { return; MICROPROFILE_SCOPE(OpenGL_Drawing); - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; ScopeAcquireGLContext acquire_context; @@ -473,7 +473,7 @@ void RasterizerOpenGL::DrawArrays() { // If indexed mode, copy the index buffer GLintptr index_buffer_offset = 0; if (is_indexed) { - const auto& memory_manager = Core::System().GetInstance().GPU().memory_manager; + const auto& memory_manager = Core::System::GetInstance().GPU().memory_manager; const boost::optional<VAddr> index_data_addr{ memory_manager->GpuToCpuAddress(regs.index_array.StartAddress())}; Memory::ReadBlock(*index_data_addr, offseted_buffer, index_buffer_size); @@ -775,7 +775,7 @@ void RasterizerOpenGL::BindFramebufferSurfaces(const Surface& color_surface, } void RasterizerOpenGL::SyncViewport(const MathUtil::Rectangle<u32>& surfaces_rect) { - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; const MathUtil::Rectangle<s32> viewport_rect{regs.viewport_transform[0].GetRect()}; state.viewport.x = static_cast<GLint>(surfaces_rect.left) + viewport_rect.left; @@ -793,7 +793,7 @@ void RasterizerOpenGL::SyncClipCoef() { } void RasterizerOpenGL::SyncCullMode() { - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; state.cull.enabled = regs.cull.enabled != 0; @@ -825,7 +825,7 @@ void RasterizerOpenGL::SyncDepthOffset() { } void RasterizerOpenGL::SyncDepthTestState() { - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; state.depth.test_enabled = regs.depth_test_enable != 0; state.depth.write_mask = regs.depth_write_enabled ? GL_TRUE : GL_FALSE; @@ -837,7 +837,7 @@ void RasterizerOpenGL::SyncDepthTestState() { } void RasterizerOpenGL::SyncBlendState() { - const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs; + const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs; // TODO(Subv): Support more than just render target 0. state.blend.enabled = regs.blend.enable[0] != 0; |