Fix some things.

This commit is contained in:
riperiperi 2022-06-14 21:15:17 +01:00
parent bf826ed9d1
commit 2ca07804f7
5 changed files with 17 additions and 11 deletions

View file

@ -48,6 +48,8 @@ namespace Ryujinx.Graphics.Gpu.Image
Items[i] = null;
}
}
UpdateModifiedSequence();
}
SequenceNumber = Context.SequenceNumber;

View file

@ -53,6 +53,9 @@ namespace Ryujinx.Graphics.Gpu.Image
private int[] _textureBindingsCount;
private int[] _imageBindingsCount;
private int _texturePoolSequence;
private int _samplerPoolSequence;
private int _textureBufferIndex;
private readonly float[] _scales;
@ -324,9 +327,6 @@ namespace Ryujinx.Graphics.Gpu.Image
}
}
private int _texturePoolSequence;
private int _samplerPoolSequence;
/// <summary>
/// Ensures that the bindings are visible to the host GPU.
/// Note: this actually performs the binding using the host graphics API.
@ -424,7 +424,7 @@ namespace Ryujinx.Graphics.Gpu.Image
}
}
if (cachedSamplerBufferIndex != samplerBufferIndex)
if (samplerBufferIndex != cachedSamplerBufferIndex)
{
ref BufferBounds bounds = ref _channel.BufferManager.GetUniformBufferBounds(_isCompute, stageIndex, samplerBufferIndex);

View file

@ -114,7 +114,7 @@ namespace Ryujinx.Graphics.Gpu.Image
}
/// <summary>
/// Gets the texture descripor and texture with the given ID.
/// Gets the texture descriptor and texture with the given ID.
/// </summary>
/// <remarks>
/// This method assumes that the pool has been manually synchronized before doing binding.

View file

@ -379,7 +379,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
}
/// <summary>
/// Gets the bounds of the compute uniform buffer currently bound at the given index.
/// Gets the bounds of the uniform buffer currently bound at the given index.
/// </summary>
/// <param name="isCompute">Indicates whenever the uniform is requested by the 3D or compute engine</param>
/// <param name="stage">Index of the shader stage, if the uniform is for the 3D engine</param>

View file

@ -202,6 +202,10 @@ namespace Ryujinx.Graphics.Gpu.Shader
}
}
/// <summary>
/// Prepare the shader specialization state for quick binding lookups.
/// </summary>
/// <param name="stages">The shader stages</param>
public void Prepare(CachedShaderStage[] stages)
{
_allTextures = _textureSpecialization.ToArray();
@ -508,7 +512,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
}
}
if (stageChange || cachedSamplerBufferIndex != samplerBufferIndex)
if (stageChange || samplerBufferIndex != cachedSamplerBufferIndex)
{
ref BufferBounds bounds = ref channel.BufferManager.GetUniformBufferBounds(isCompute, stageIndex, samplerBufferIndex);