aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs')
-rw-r--r--src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
index ad018f15..f96ddfb1 100644
--- a/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
+++ b/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
@@ -187,7 +187,9 @@ namespace Ryujinx.Graphics.Gpu.Image
{
(TexturePool texturePool, SamplerPool samplerPool) = GetPools();
- return (texturePool.Get(textureId), samplerPool.Get(samplerId));
+ Sampler sampler = samplerPool?.Get(samplerId);
+
+ return (texturePool.Get(textureId, sampler?.IsSrgb ?? true), sampler);
}
/// <summary>
@@ -508,11 +510,11 @@ namespace Ryujinx.Graphics.Gpu.Image
state.TextureHandle = textureId;
state.SamplerHandle = samplerId;
- ref readonly TextureDescriptor descriptor = ref texturePool.GetForBinding(textureId, out Texture texture);
+ Sampler sampler = samplerPool?.Get(samplerId);
- specStateMatches &= specState.MatchesTexture(stage, index, descriptor);
+ ref readonly TextureDescriptor descriptor = ref texturePool.GetForBinding(textureId, sampler?.IsSrgb ?? true, out Texture texture);
- Sampler sampler = samplerPool?.Get(samplerId);
+ specStateMatches &= specState.MatchesTexture(stage, index, descriptor);
ITexture hostTexture = texture?.GetTargetTexture(bindingInfo.Target);
ISampler hostSampler = sampler?.GetHostSampler(texture);