Add support for sampler sRGB disable (#7312)

This commit is contained in:
gdkchan 2024-09-19 14:38:30 -03:00 committed by GitHub
parent 73f985d27c
commit 24ee8c39f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 48 additions and 6 deletions

View file

@ -13,6 +13,11 @@ namespace Ryujinx.Graphics.Gpu.Image
/// </summary>
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>
@ -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();