aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Compute.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-22 20:37:45 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit3ac023bb607eb630e86859cba0d3ebac55f4257a (patch)
treee60d64a0335797a1166c05cd5be45121c68e54fa /Ryujinx.Graphics.Gpu/Engine/Compute.cs
parent79de8fd4904ec19318baceb999a7d1a84f686794 (diff)
Correct ordering of compute buffer bind
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Compute.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Compute.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs
index ba7daf67..eb7c4f4a 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs
@@ -40,32 +40,6 @@ namespace Ryujinx.Graphics.Gpu.Engine
ShaderProgramInfo info = cs.Shader.Program.Info;
- var textureBindings = new TextureBindingInfo[info.Textures.Count];
-
- for (int index = 0; index < info.Textures.Count; index++)
- {
- var descriptor = info.Textures[index];
-
- Target target = GetTarget(descriptor.Type);
-
- textureBindings[index] = new TextureBindingInfo(target, descriptor.HandleIndex);
- }
-
- _textureManager.SetComputeTextures(textureBindings);
-
- var imageBindings = new TextureBindingInfo[info.Images.Count];
-
- for (int index = 0; index < info.Images.Count; index++)
- {
- var descriptor = info.Images[index];
-
- Target target = GetTarget(descriptor.Type);
-
- imageBindings[index] = new TextureBindingInfo(target, descriptor.HandleIndex);
- }
-
- _textureManager.SetComputeImages(imageBindings);
-
uint sbEnableMask = 0;
uint ubEnableMask = dispatchParams.UnpackUniformBuffersEnableMask();
@@ -111,6 +85,32 @@ namespace Ryujinx.Graphics.Gpu.Engine
_bufferManager.SetComputeStorageBufferEnableMask(sbEnableMask);
_bufferManager.SetComputeUniformBufferEnableMask(ubEnableMask);
+ var textureBindings = new TextureBindingInfo[info.Textures.Count];
+
+ for (int index = 0; index < info.Textures.Count; index++)
+ {
+ var descriptor = info.Textures[index];
+
+ Target target = GetTarget(descriptor.Type);
+
+ textureBindings[index] = new TextureBindingInfo(target, descriptor.HandleIndex);
+ }
+
+ _textureManager.SetComputeTextures(textureBindings);
+
+ var imageBindings = new TextureBindingInfo[info.Images.Count];
+
+ for (int index = 0; index < info.Images.Count; index++)
+ {
+ var descriptor = info.Images[index];
+
+ Target target = GetTarget(descriptor.Type);
+
+ imageBindings[index] = new TextureBindingInfo(target, descriptor.HandleIndex);
+ }
+
+ _textureManager.SetComputeImages(imageBindings);
+
_bufferManager.CommitComputeBindings();
_textureManager.CommitComputeBindings();