summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-06-18 01:35:25 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:38 +0200
commit0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9 (patch)
tree1e401c05019e5ecbd02a75cc592871fc1f65a8e0 /src
parentspirv: Properly handle devices without int8 and int16 (diff)
downloadyuzu-0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9.tar
yuzu-0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9.tar.gz
yuzu-0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9.tar.bz2
yuzu-0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9.tar.lz
yuzu-0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9.tar.xz
yuzu-0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9.tar.zst
yuzu-0cd08b3e72ed042ae0bf97c62fb6b54580b0dfc9.zip
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
index bab32b58b..a82472152 100644
--- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
+++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include "common/alignment.h"
#include "shader_recompiler/environment.h"
#include "shader_recompiler/frontend/ir/modifiers.h"
#include "shader_recompiler/frontend/ir/program.h"
@@ -602,7 +603,7 @@ void VisitUsages(Info& info, IR::Inst& inst) {
}
u32& size{info.constant_buffer_used_sizes[index.U32()]};
if (offset.IsImmediate()) {
- size = std::max(size, offset.U32() + element_size);
+ size = Common::AlignUp(std::max(size, offset.U32() + element_size), 16u);
} else {
size = 0x10'000;
}