mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-30 02:06:25 +02:00
Add support for sampler sRGB disable (#7312)
This commit is contained in:
parent
73f985d27c
commit
24ee8c39f1
4 changed files with 48 additions and 6 deletions
|
@ -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,12 +510,12 @@ 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);
|
||||
|
||||
ref readonly TextureDescriptor descriptor = ref texturePool.GetForBinding(textureId, sampler?.IsSrgb ?? true, out Texture texture);
|
||||
|
||||
specStateMatches &= specState.MatchesTexture(stage, index, descriptor);
|
||||
|
||||
Sampler sampler = samplerPool?.Get(samplerId);
|
||||
|
||||
ITexture hostTexture = texture?.GetTargetTexture(bindingInfo.Target);
|
||||
ISampler hostSampler = sampler?.GetHostSampler(texture);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue