Эх сурвалжийг харах

Fix separate bindless sampler at offset 0 (#2360)

gdkchan 4 жил өмнө
parent
commit
65fee49e8a

+ 1 - 1
Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs

@@ -473,7 +473,7 @@ namespace Ryujinx.Graphics.Gpu.Image
                     ? bufferManager.GetComputeUniformBufferAddress(samplerBufferIndex)
                     : bufferManager.GetGraphicsUniformBufferAddress(stageIndex, samplerBufferIndex);
 
-                handle |= _context.PhysicalMemory.Read<int>(samplerBufferAddress + (ulong)((uint)wordOffset >> HandleHigh) * 4);
+                handle |= _context.PhysicalMemory.Read<int>(samplerBufferAddress + (ulong)((wordOffset >> HandleHigh) - 1) * 4);
             }
 
             return handle;

+ 1 - 1
Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs

@@ -58,7 +58,7 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
                     SetHandle(
                         config,
                         texOp,
-                        src0.GetCbufOffset() | (src1.GetCbufOffset() << 16),
+                        src0.GetCbufOffset() | ((src1.GetCbufOffset() + 1) << 16),
                         src0.GetCbufSlot() | ((src1.GetCbufSlot() + 1) << 16));
                 }
                 else if (texOp.Inst == Instruction.ImageLoad || texOp.Inst == Instruction.ImageStore)