diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-28 22:11:23 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-30 06:45:50 +0100 |
commit | 477d616f7df3b609afcb67d69d9570098cc00029 (patch) | |
tree | 4e4395842d44583d88abaacfb23e88073223bf5c /src/video_core/renderer_opengl | |
parent | Merge pull request #2070 from ReinUsesLisp/cubearray-view (diff) | |
download | yuzu-477d616f7df3b609afcb67d69d9570098cc00029.tar yuzu-477d616f7df3b609afcb67d69d9570098cc00029.tar.gz yuzu-477d616f7df3b609afcb67d69d9570098cc00029.tar.bz2 yuzu-477d616f7df3b609afcb67d69d9570098cc00029.tar.lz yuzu-477d616f7df3b609afcb67d69d9570098cc00029.tar.xz yuzu-477d616f7df3b609afcb67d69d9570098cc00029.tar.zst yuzu-477d616f7df3b609afcb67d69d9570098cc00029.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 2 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 5 |
2 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 ee313cb2f..aed6843d4 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -957,7 +957,7 @@ void RasterizerOpenGL::SetupConstBuffers(Tegra::Engines::Maxwell3D::Regs::Shader } } else { // Buffer is accessed directly, upload just what we use - size = used_buffer.GetSize() * sizeof(float); + size = used_buffer.GetSize(); } // Align the actual size so it ends up being a multiple of vec4 to meet the OpenGL std140 diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 004245431..36035d0d2 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -543,8 +543,9 @@ private: if (const auto immediate = std::get_if<ImmediateNode>(offset)) { // Direct access const u32 offset_imm = immediate->GetValue(); - return fmt::format("{}[{}][{}]", GetConstBuffer(cbuf->GetIndex()), offset_imm / 4, - offset_imm % 4); + ASSERT_MSG(offset_imm % 4 == 0, "Unaligned cbuf direct access"); + return fmt::format("{}[{}][{}]", GetConstBuffer(cbuf->GetIndex()), + offset_imm / (4 * 4), (offset_imm / 4) % 4); } else if (std::holds_alternative<OperationNode>(*offset)) { // Indirect access |