Fix NRE when using buffer image array (#7159)

This commit is contained in:
gdkchan 2024-08-20 20:49:17 -03:00 committed by GitHub
parent 552c15739c
commit 460f9faf4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 13 deletions

View file

@ -95,7 +95,7 @@ namespace Ryujinx.Graphics.Vulkan
{
_cachedCommandBufferIndex = -1;
_storages = null;
SetDirty(_gd);
SetDirty(_gd, isImage: true);
}
public void QueueWriteToReadBarriers(CommandBufferScoped cbs, PipelineStageFlags stageFlags)

View file

@ -14,13 +14,20 @@ namespace Ryujinx.Graphics.Vulkan
private int _bindCount;
protected void SetDirty(VulkanRenderer gd)
protected void SetDirty(VulkanRenderer gd, bool isImage)
{
ReleaseDescriptorSet();
if (_bindCount != 0)
{
gd.PipelineInternal.ForceTextureDirty();
if (isImage)
{
gd.PipelineInternal.ForceImageDirty();
}
else
{
gd.PipelineInternal.ForceTextureDirty();
}
}
}

View file

@ -104,7 +104,7 @@ namespace Ryujinx.Graphics.Vulkan
{
_cachedCommandBufferIndex = -1;
_storages = null;
SetDirty(_gd);
SetDirty(_gd, isImage: false);
}
public void QueueWriteToReadBarriers(CommandBufferScoped cbs, PipelineStageFlags stageFlags)