Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for pool change on texture bindings cache #3420

Merged
merged 2 commits into from Jun 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
Expand Up @@ -43,6 +43,8 @@ private struct TextureState
public int TextureHandle;
public int SamplerHandle;
public int InvalidatedSequence;
public TexturePool CachedTexturePool;
public SamplerPool CachedSamplerPool;
public Texture CachedTexture;
public Sampler CachedSampler;
public int ScaleIndex;
Expand Down Expand Up @@ -493,6 +495,8 @@ private bool CommitTextureBindings(TexturePool pool, ShaderStage stage, int stag
ref TextureState state = ref _textureState[bindingInfo.Binding];

if (!poolModified &&
state.CachedTexturePool == pool &&
state.CachedSamplerPool == samplerPool &&
state.TextureHandle == textureId &&
state.SamplerHandle == samplerId &&
state.CachedTexture != null &&
Expand All @@ -517,6 +521,8 @@ private bool CommitTextureBindings(TexturePool pool, ShaderStage stage, int stag
continue;
}

state.CachedTexturePool = pool;
state.CachedSamplerPool = samplerPool;
state.TextureHandle = textureId;
state.SamplerHandle = samplerId;

Expand Down