Fix image units bindings and shader dump in the presence of NOPs
This commit is contained in:
parent
d620aa7d1b
commit
d274328c31
3 changed files with 51 additions and 48 deletions
|
@ -79,6 +79,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
int ubBindingPoint = 1;
|
||||
int sbBindingPoint = 0;
|
||||
int textureUnit = 0;
|
||||
int imageUnit = 0;
|
||||
|
||||
for (int index = 0; index < shaders.Length; index++)
|
||||
{
|
||||
|
@ -151,13 +152,13 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
continue;
|
||||
}
|
||||
|
||||
GL.Uniform1(location, textureUnit);
|
||||
GL.Uniform1(location, imageUnit);
|
||||
|
||||
int uIndex = (int)shader.Stage << ImgStageShift | imageIndex++;
|
||||
|
||||
_textureUnits[uIndex] = textureUnit;
|
||||
_imageUnits[uIndex] = imageUnit;
|
||||
|
||||
textureUnit++;
|
||||
imageUnit++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +185,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
|
||||
public int GetImageUnit(ShaderStage stage, int index)
|
||||
{
|
||||
return _textureUnits[(int)stage << ImgStageShift | index];
|
||||
return _imageUnits[(int)stage << ImgStageShift | index];
|
||||
}
|
||||
|
||||
private void CheckProgramLink()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue