Fix HasUnalignedStorageBuffers value when buffers are always unaligned (#4078)
This commit is contained in:
parent
539b22ef7b
commit
459c4caeba
2 changed files with 9 additions and 6 deletions
|
@ -253,14 +253,19 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||||
/// Indicates that any storage buffer use is unaligned.
|
/// Indicates that any storage buffer use is unaligned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value">The new value</param>
|
/// <param name="value">The new value</param>
|
||||||
public void SetHasUnalignedStorageBuffer(bool value)
|
/// <returns>True if the unaligned state changed, false otherwise</returns>
|
||||||
|
public bool SetHasUnalignedStorageBuffer(bool value)
|
||||||
{
|
{
|
||||||
if (value != _graphics.HasUnalignedStorageBuffer)
|
if (value != _graphics.HasUnalignedStorageBuffer)
|
||||||
{
|
{
|
||||||
_graphics.HasUnalignedStorageBuffer = value;
|
_graphics.HasUnalignedStorageBuffer = value;
|
||||||
|
|
||||||
Signal();
|
Signal();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -304,14 +304,12 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void CommitBindings()
|
private void CommitBindings()
|
||||||
{
|
{
|
||||||
var buffers = _channel.BufferManager;
|
|
||||||
var hasUnaligned = buffers.HasUnalignedStorageBuffers;
|
|
||||||
|
|
||||||
UpdateStorageBuffers();
|
UpdateStorageBuffers();
|
||||||
|
|
||||||
if (!_channel.TextureManager.CommitGraphicsBindings(_shaderSpecState) || (buffers.HasUnalignedStorageBuffers != hasUnaligned))
|
bool unalignedChanged = _currentSpecState.SetHasUnalignedStorageBuffer(_channel.BufferManager.HasUnalignedStorageBuffers);
|
||||||
|
|
||||||
|
if (!_channel.TextureManager.CommitGraphicsBindings(_shaderSpecState) || unalignedChanged)
|
||||||
{
|
{
|
||||||
_currentSpecState.SetHasUnalignedStorageBuffer(buffers.HasUnalignedStorageBuffers);
|
|
||||||
// Shader must be reloaded. _vtgWritesRtLayer should not change.
|
// Shader must be reloaded. _vtgWritesRtLayer should not change.
|
||||||
UpdateShaderState();
|
UpdateShaderState();
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue