summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-06-07 15:33:23 +0200
committerSubv <subv2112@gmail.com>2018-06-07 15:33:23 +0200
commit86146ef8194669d1961aff3c241e6fd6fd8dbc77 (patch)
treeeab825475e7b73c200a25e42ea0711fd41198a11 /src
parentMerge pull request #534 from Subv/multitexturing (diff)
downloadyuzu-86146ef8194669d1961aff3c241e6fd6fd8dbc77.tar
yuzu-86146ef8194669d1961aff3c241e6fd6fd8dbc77.tar.gz
yuzu-86146ef8194669d1961aff3c241e6fd6fd8dbc77.tar.bz2
yuzu-86146ef8194669d1961aff3c241e6fd6fd8dbc77.tar.lz
yuzu-86146ef8194669d1961aff3c241e6fd6fd8dbc77.tar.xz
yuzu-86146ef8194669d1961aff3c241e6fd6fd8dbc77.tar.zst
yuzu-86146ef8194669d1961aff3c241e6fd6fd8dbc77.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index b23b8fb29..e7fbc703a 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -214,13 +214,14 @@ void RasterizerOpenGL::SetupShaders(u8* buffer_ptr, GLintptr buffer_offset) {
continue;
}
+ GLShader::MaxwellUniformData ubo{};
+ ubo.SetFromRegs(gpu.state.shader_stages[stage]);
+ std::memcpy(buffer_ptr, &ubo, sizeof(ubo));
+
// Upload uniform data as one UBO per stage
const GLintptr ubo_offset = buffer_offset;
copy_buffer(uniform_buffers[stage].handle, ubo_offset,
sizeof(GLShader::MaxwellUniformData));
- GLShader::MaxwellUniformData* ub_ptr =
- reinterpret_cast<GLShader::MaxwellUniformData*>(buffer_ptr);
- ub_ptr->SetFromRegs(gpu.state.shader_stages[stage]);
buffer_ptr += sizeof(GLShader::MaxwellUniformData);
buffer_offset += sizeof(GLShader::MaxwellUniformData);