diff options
author | riperiperi <rhy3756547@hotmail.com> | 2022-11-25 14:39:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 14:39:03 +0000 |
commit | 476b4683cf428cddef3abbcf256ab7a931b9977c (patch) | |
tree | fa49a87907b6e42e9a58fe96077858bf90db0893 /Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs | |
parent | 5fb5079730e249d426f3f1afb45c4519708dfe4b (diff) |
Fix CB0 alignment with addresses used for 8/16-bit LDG/STG (#3897)1.1.387
This replacement is meant to be done with the original identified byteOffset, not the one assigned later on by the below conditionals (that already has the constant offset added, for instance).
This fixes videos being pixelated in Xenoblade 3, and other regressions that might have happened since #3847.
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs b/Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs index 25c0eb25..7aabcc9e 100644 --- a/Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs +++ b/Ryujinx.Graphics.Shader/Translation/Optimizations/GlobalToStorage.cs @@ -128,6 +128,11 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations GetStorageOffset(block, Utils.FindLastOperation(addrLow, block), baseAddressCbOffset) : (null, 0); + if (byteOffset != null) + { + ReplaceAddressAlignment(node.List, addrLow, byteOffset, constantOffset); + } + if (byteOffset == null) { Operand baseAddrLow = Cbuf(0, baseAddressCbOffset); @@ -156,11 +161,6 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations byteOffset = offset; } - if (byteOffset != null) - { - ReplaceAddressAlignment(node.List, addrLow, byteOffset, constantOffset); - } - if (isStg16Or8) { return byteOffset; |