diff options
author | gdkchan <gab.dark.100@gmail.com> | 2024-04-18 19:28:16 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 19:28:16 -0300 |
commit | 2f93ae9a191e1fb5415227f004e9a48a11b7a180 (patch) | |
tree | 10ee7d28ea9949c8b9db73cd8842377e0d241eb2 | |
parent | 3224ddeeb41fbbc831e00246c21c9d769b5a28ac (diff) |
Fix unmapped address check when reading texture handles (#6679)1.1.1284
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs index 3c10c95e..a1dde673 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs @@ -770,7 +770,7 @@ namespace Ryujinx.Graphics.Gpu.Image ? _channel.BufferManager.GetComputeUniformBufferAddress(textureBufferIndex) : _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, textureBufferIndex); - int handle = textureBufferAddress != 0 + int handle = textureBufferAddress != MemoryManager.PteUnmapped ? _channel.MemoryManager.Physical.Read<int>(textureBufferAddress + (uint)textureWordOffset * 4) : 0; @@ -790,7 +790,7 @@ namespace Ryujinx.Graphics.Gpu.Image ? _channel.BufferManager.GetComputeUniformBufferAddress(samplerBufferIndex) : _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, samplerBufferIndex); - samplerHandle = samplerBufferAddress != 0 + samplerHandle = samplerBufferAddress != MemoryManager.PteUnmapped ? _channel.MemoryManager.Physical.Read<int>(samplerBufferAddress + (uint)samplerWordOffset * 4) : 0; } |