aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
index a6953cd2..f429ae90 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs
@@ -970,14 +970,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
if (info == null)
{
- _channel.TextureManager.SetGraphicsTextures(stage, Array.Empty<TextureBindingInfo>());
- _channel.TextureManager.SetGraphicsImages(stage, Array.Empty<TextureBindingInfo>());
+ _channel.TextureManager.RentGraphicsTextureBindings(stage, 0);
+ _channel.TextureManager.RentGraphicsImageBindings(stage, 0);
_channel.BufferManager.SetGraphicsStorageBufferBindings(stage, null);
_channel.BufferManager.SetGraphicsUniformBufferBindings(stage, null);
continue;
}
- var textureBindings = new TextureBindingInfo[info.Textures.Count];
+ Span<TextureBindingInfo> textureBindings = _channel.TextureManager.RentGraphicsTextureBindings(stage, info.Textures.Count);
for (int index = 0; index < info.Textures.Count; index++)
{
@@ -993,9 +993,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
descriptor.Flags);
}
- _channel.TextureManager.SetGraphicsTextures(stage, textureBindings);
-
- var imageBindings = new TextureBindingInfo[info.Images.Count];
+ TextureBindingInfo[] imageBindings = _channel.TextureManager.RentGraphicsImageBindings(stage, info.Images.Count);
for (int index = 0; index < info.Images.Count; index++)
{
@@ -1013,8 +1011,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
descriptor.Flags);
}
- _channel.TextureManager.SetGraphicsImages(stage, imageBindings);
-
_channel.BufferManager.SetGraphicsStorageBufferBindings(stage, info.SBuffers);
_channel.BufferManager.SetGraphicsUniformBufferBindings(stage, info.CBuffers);
}