aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu/Image/Sampler.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-09-19 14:38:30 -0300
committerGitHub <noreply@github.com>2024-09-19 14:38:30 -0300
commit24ee8c39f1fd8ae2dc2d92cda1cdb41e8af45f0a (patch)
tree5cdbf2df0e5ca731ae7368c79f70e734da6d8c62 /src/Ryujinx.Graphics.Gpu/Image/Sampler.cs
parent73f985d27ca0c85f053e8b9494ba83a6c4d3afbf (diff)
Add support for sampler sRGB disable (#7312)1.1.1396
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Image/Sampler.cs')
-rw-r--r--src/Ryujinx.Graphics.Gpu/Image/Sampler.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Image/Sampler.cs b/src/Ryujinx.Graphics.Gpu/Image/Sampler.cs
index d6a3d975..b007c159 100644
--- a/src/Ryujinx.Graphics.Gpu/Image/Sampler.cs
+++ b/src/Ryujinx.Graphics.Gpu/Image/Sampler.cs
@@ -14,6 +14,11 @@ namespace Ryujinx.Graphics.Gpu.Image
public bool IsDisposed { get; private set; }
/// <summary>
+ /// True if the sampler has sRGB conversion enabled, false otherwise.
+ /// </summary>
+ public bool IsSrgb { get; }
+
+ /// <summary>
/// Host sampler object.
/// </summary>
private readonly ISampler _hostSampler;
@@ -30,6 +35,8 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <param name="descriptor">The Maxwell sampler descriptor</param>
public Sampler(GpuContext context, SamplerDescriptor descriptor)
{
+ IsSrgb = descriptor.UnpackSrgb();
+
MinFilter minFilter = descriptor.UnpackMinFilter();
MagFilter magFilter = descriptor.UnpackMagFilter();