aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs20
-rw-r--r--Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs2
2 files changed, 16 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
index 18f5a74a..fcd23441 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
@@ -792,13 +792,23 @@ namespace Ryujinx.Graphics.Gpu.Image
// turn that into a regular texture access and produce those special handles with values on the higher 16 bits.
if (handleType != TextureHandleType.CombinedSampler)
{
- ulong samplerBufferAddress = _isCompute
- ? _channel.BufferManager.GetComputeUniformBufferAddress(samplerBufferIndex)
- : _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, samplerBufferIndex);
+ int samplerHandle;
- int samplerHandle = _channel.MemoryManager.Physical.Read<int>(samplerBufferAddress + (uint)samplerWordOffset * 4);
+ if (handleType != TextureHandleType.SeparateConstantSamplerHandle)
+ {
+ ulong samplerBufferAddress = _isCompute
+ ? _channel.BufferManager.GetComputeUniformBufferAddress(samplerBufferIndex)
+ : _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, samplerBufferIndex);
+
+ samplerHandle = _channel.MemoryManager.Physical.Read<int>(samplerBufferAddress + (uint)samplerWordOffset * 4);
+ }
+ else
+ {
+ samplerHandle = samplerWordOffset;
+ }
- if (handleType == TextureHandleType.SeparateSamplerId)
+ if (handleType == TextureHandleType.SeparateSamplerId ||
+ handleType == TextureHandleType.SeparateConstantSamplerHandle)
{
samplerHandle <<= 20;
}
diff --git a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs b/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
index 5d99957f..59801001 100644
--- a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
+++ b/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
private const ushort FileFormatVersionMajor = 1;
private const ushort FileFormatVersionMinor = 1;
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
- private const uint CodeGenVersion = 1;
+ private const uint CodeGenVersion = 3424;
private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data";