2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

shader: Fix alignment checks on RZ

This commit is contained in:
ReinUsesLisp 2021-03-29 01:16:16 -03:00 committed by ameerj
parent 73af0d2e0d
commit 39a379632e

View file

@ -309,7 +309,7 @@ constexpr Reg operator++(Reg& reg, int) {
} }
[[nodiscard]] constexpr bool IsAligned(Reg reg, size_t align) { [[nodiscard]] constexpr bool IsAligned(Reg reg, size_t align) {
return (RegIndex(reg) / align) * align == RegIndex(reg); return RegIndex(reg) % align == 0 || reg == Reg::RZ;
} }
} // namespace Shader::IR } // namespace Shader::IR