mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-13 16:20:18 +00:00
Fix some things.
This commit is contained in:
parent
bf826ed9d1
commit
2ca07804f7
5 changed files with 17 additions and 11 deletions
|
@ -48,6 +48,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
Items[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateModifiedSequence();
|
||||
}
|
||||
|
||||
SequenceNumber = Context.SequenceNumber;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
@ -719,8 +719,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
(int textureWordOffset, int samplerWordOffset, TextureHandleType handleType) = TextureHandle.UnpackOffsets(wordOffset);
|
||||
|
||||
ulong textureBufferAddress = _isCompute
|
||||
? _channel.BufferManager.GetComputeUniformBufferAddress(textureBufferIndex)
|
||||
: _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, textureBufferIndex);
|
||||
? _channel.BufferManager.GetComputeUniformBufferAddress(textureBufferIndex)
|
||||
: _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, textureBufferIndex);
|
||||
|
||||
int handle = _channel.MemoryManager.Physical.Read<int>(textureBufferAddress + (uint)textureWordOffset * 4);
|
||||
|
||||
|
@ -733,8 +733,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
if (handleType != TextureHandleType.CombinedSampler)
|
||||
{
|
||||
ulong samplerBufferAddress = _isCompute
|
||||
? _channel.BufferManager.GetComputeUniformBufferAddress(samplerBufferIndex)
|
||||
: _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, samplerBufferIndex);
|
||||
? _channel.BufferManager.GetComputeUniformBufferAddress(samplerBufferIndex)
|
||||
: _channel.BufferManager.GetGraphicsUniformBufferAddress(stageIndex, samplerBufferIndex);
|
||||
|
||||
int samplerHandle = _channel.MemoryManager.Physical.Read<int>(samplerBufferAddress + (uint)samplerWordOffset * 4);
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue