aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Pipeline.cs
diff options
context:
space:
mode:
authorgdk <gab.dark.100@gmail.com>2019-11-27 00:41:22 -0300
committerThog <thog@protonmail.com>2020-01-09 02:13:00 +0100
commit396768f3b4494c7dcb0c03942eeb50ef4d47adde (patch)
tree62816d8b16e74acf7f8f4379b25d558c629527b9 /Ryujinx.Graphics.OpenGL/Pipeline.cs
parent442485adb32626b3931cd15f284d0e686b0021fc (diff)
Fix texture 0 not being bound for compute
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Pipeline.cs20
1 files changed, 15 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs
index 745926e7..4eb94097 100644
--- a/Ryujinx.Graphics.OpenGL/Pipeline.cs
+++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs
@@ -285,6 +285,13 @@ namespace Ryujinx.Graphics.OpenGL
public void Dispatch(int groupsX, int groupsY, int groupsZ)
{
+ if (!_program.IsLinked)
+ {
+ return;
+ }
+
+ PrepareForDispatch();
+
GL.DispatchCompute(groupsX, groupsY, groupsZ);
}
@@ -872,6 +879,14 @@ namespace Ryujinx.Graphics.OpenGL
}
}
+ private void PrepareForDispatch()
+ {
+ if (_unit0Texture != null)
+ {
+ _unit0Texture.Bind(0);
+ }
+ }
+
private void PrepareForDraw()
{
_vertexArray.Validate();
@@ -894,10 +909,5 @@ namespace Ryujinx.Graphics.OpenGL
(_componentMasks[index] & 8u) != 0);
}
}
-
- public void RebindProgram()
- {
- _program?.Bind();
- }
}
}