diff options
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Pipeline.cs | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index 9b1fec33..64705862 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -1,10 +1,10 @@ using OpenTK.Graphics.OpenGL; +using Ryujinx.Common.Logging; using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.GAL.Blend; using Ryujinx.Graphics.GAL.Color; using Ryujinx.Graphics.GAL.DepthStencil; using Ryujinx.Graphics.GAL.InputAssembler; -using Ryujinx.Graphics.OpenGL.Formats; using Ryujinx.Graphics.Shader; using System; @@ -114,6 +114,10 @@ namespace Ryujinx.Graphics.OpenGL { ((Sampler)sampler).Bind(unit); } + else if (unit == -1) + { + Logger.PrintError(LogClass.Gpu, $"Invalid binding point: {stage} {index}."); + } } public void BindTexture(int index, ShaderStage stage, ITexture texture) @@ -131,6 +135,10 @@ namespace Ryujinx.Graphics.OpenGL ((TextureView)texture).Bind(unit); } } + else if (unit == -1) + { + Logger.PrintError(LogClass.Gpu, $"Invalid binding point: {stage} {index}."); + } } public void BindStorageBuffer(int index, ShaderStage stage, BufferRange buffer) @@ -151,6 +159,8 @@ namespace Ryujinx.Graphics.OpenGL if (bindingPoint == -1) { + Logger.PrintError(LogClass.Gpu, $"Invalid binding point: {stage} {index}."); + return; } @@ -289,6 +299,8 @@ namespace Ryujinx.Graphics.OpenGL { if (!_program.IsLinked) { + Logger.PrintError(LogClass.Gpu, "Dispatch error, shader not linked."); + return; } @@ -301,6 +313,8 @@ namespace Ryujinx.Graphics.OpenGL { if (!_program.IsLinked) { + Logger.PrintError(LogClass.Gpu, "Draw error, shader not linked."); + return; } @@ -407,13 +421,13 @@ namespace Ryujinx.Graphics.OpenGL { if (!_program.IsLinked) { + Logger.PrintError(LogClass.Gpu, "Draw error, shader not linked."); + return; } PrepareForDraw(); - int firstIndexOffset = firstIndex; - int indexElemSize = 1; switch (_elementsType) @@ -450,7 +464,6 @@ namespace Ryujinx.Graphics.OpenGL indexCount, instanceCount, indexBaseOffset, - indexElemSize, firstVertex, firstInstance); } @@ -536,7 +549,6 @@ namespace Ryujinx.Graphics.OpenGL int indexCount, int instanceCount, IntPtr indexBaseOffset, - int indexElemSize, int firstVertex, int firstInstance) { |