diff --git a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs index 87b0f444f..be78c827c 100644 --- a/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs +++ b/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs @@ -290,6 +290,14 @@ namespace Ryujinx.Graphics.Gpu.Image ITexture hostTexture = texture?.GetTargetTexture(binding.Target); + if (hostTexture != null && texture.Info.Target == Target.TextureBuffer) + { + // Ensure that the buffer texture is using the correct buffer as storage. + // Buffers are frequently re-created to accomodate larger data, so we need to re-bind + // to ensure we're not using a old buffer that was already deleted. + _context.Methods.BufferManager.SetBufferTextureStorage(hostTexture, texture.Address, texture.Size, _isCompute); + } + if (_imageState[stageIndex][index].Texture != hostTexture || _rebind) { _imageState[stageIndex][index].Texture = hostTexture;