aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.OpenGL/Pipeline.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r--Ryujinx.Graphics.OpenGL/Pipeline.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs
index 52d64df5..2650e9ee 100644
--- a/Ryujinx.Graphics.OpenGL/Pipeline.cs
+++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs
@@ -693,7 +693,7 @@ namespace Ryujinx.Graphics.OpenGL
SetFrontFace(_frontFace = frontFace.Convert());
}
- public void SetImage(int index, ShaderStage stage, ITexture texture)
+ public void SetImage(int index, ShaderStage stage, ITexture texture, Format imageFormat)
{
int unit = _program.GetImageUnit(stage, index);
@@ -701,11 +701,12 @@ namespace Ryujinx.Graphics.OpenGL
{
TextureBase texBase = (TextureBase)texture;
- FormatInfo formatInfo = FormatTable.GetFormatInfo(texBase.Format);
+ SizedInternalFormat format = FormatTable.GetImageFormat(imageFormat);
- SizedInternalFormat format = (SizedInternalFormat)formatInfo.PixelInternalFormat;
-
- GL.BindImageTexture(unit, texBase.Handle, 0, true, 0, TextureAccess.ReadWrite, format);
+ if (format != 0)
+ {
+ GL.BindImageTexture(unit, texBase.Handle, 0, true, 0, TextureAccess.ReadWrite, format);
+ }
}
}