diff options
author | gdkchan <gab.dark.100@gmail.com> | 2024-09-19 14:38:30 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-19 14:38:30 -0300 |
commit | 24ee8c39f1fd8ae2dc2d92cda1cdb41e8af45f0a (patch) | |
tree | 5cdbf2df0e5ca731ae7368c79f70e734da6d8c62 /src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs | |
parent | 73f985d27ca0c85f053e8b9494ba83a6c4d3afbf (diff) |
Add support for sampler sRGB disable (#7312)1.1.1396
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs | 10 |
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); |