Explorar o código

shader: Fix alignment checks on RZ

ReinUsesLisp %!s(int64=5) %!d(string=hai) anos
pai
achega
39a379632e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/shader_recompiler/frontend/ir/reg.h

+ 1 - 1
src/shader_recompiler/frontend/ir/reg.h

@@ -309,7 +309,7 @@ constexpr Reg operator++(Reg& reg, int) {
 }
 
 [[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