summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-10-01 19:28:50 +0200
committerGitHub <noreply@github.com>2022-10-01 19:28:50 +0200
commit424206456088135cd5ec6e1d953896a070a7eaaa (patch)
tree1f57423211627e9677d46bc3efb0f901cd3728b2 /src/video_core
parentMerge pull request #9004 from zhaobot/tx-update-20221001041028 (diff)
parentAlign index buffe size when vertex_buffer_unified_memory enable (diff)
downloadyuzu-424206456088135cd5ec6e1d953896a070a7eaaa.tar
yuzu-424206456088135cd5ec6e1d953896a070a7eaaa.tar.gz
yuzu-424206456088135cd5ec6e1d953896a070a7eaaa.tar.bz2
yuzu-424206456088135cd5ec6e1d953896a070a7eaaa.tar.lz
yuzu-424206456088135cd5ec6e1d953896a070a7eaaa.tar.xz
yuzu-424206456088135cd5ec6e1d953896a070a7eaaa.tar.zst
yuzu-424206456088135cd5ec6e1d953896a070a7eaaa.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_buffer_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.cpp b/src/video_core/renderer_opengl/gl_buffer_cache.cpp
index 32450ee1d..08f4d69ab 100644
--- a/src/video_core/renderer_opengl/gl_buffer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_buffer_cache.cpp
@@ -168,7 +168,7 @@ void BufferCacheRuntime::BindIndexBuffer(Buffer& buffer, u32 offset, u32 size) {
if (has_unified_vertex_buffers) {
buffer.MakeResident(GL_READ_ONLY);
glBufferAddressRangeNV(GL_ELEMENT_ARRAY_ADDRESS_NV, 0, buffer.HostGpuAddr() + offset,
- static_cast<GLsizeiptr>(size));
+ static_cast<GLsizeiptr>(Common::AlignUp(size, 4)));
} else {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer.Handle());
index_buffer_offset = offset;