mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-02 22:22:03 +00:00
Fix value of constant vertex attributes (#2307)
This commit is contained in:
parent
79092310fa
commit
3fd6b55f04
2 changed files with 12 additions and 10 deletions
|
@ -80,7 +80,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
if (attrib.IsZero)
|
if (attrib.IsZero)
|
||||||
{
|
{
|
||||||
// Disabling the attribute causes the shader to read a constant value.
|
// Disabling the attribute causes the shader to read a constant value.
|
||||||
// The value is configurable, but by default is a vector of (0, 0, 0, 1).
|
// We currently set the constant to (0, 0, 0, 0).
|
||||||
DisableVertexAttrib(index);
|
DisableVertexAttrib(index);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -176,6 +176,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
{
|
{
|
||||||
_vertexAttribsInUse &= ~mask;
|
_vertexAttribsInUse &= ~mask;
|
||||||
GL.DisableVertexAttribArray(index);
|
GL.DisableVertexAttribArray(index);
|
||||||
|
GL.VertexAttrib4(index, 0f, 0f, 0f, 0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,19 +129,20 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||||
{
|
{
|
||||||
config.SetUsedFeature(FeatureFlags.Bindless);
|
config.SetUsedFeature(FeatureFlags.Bindless);
|
||||||
}
|
}
|
||||||
else // Not bindless, fill up texture handles
|
|
||||||
|
for (int funcIndex = 0; funcIndex < cfg.Length; funcIndex++)
|
||||||
{
|
{
|
||||||
for (int funcIndex = 0; funcIndex < cfg.Length; funcIndex++)
|
for (int blkIndex = 0; blkIndex < cfg[funcIndex].Length; blkIndex++)
|
||||||
{
|
{
|
||||||
for (int blkIndex = 0; blkIndex < cfg[funcIndex].Length; blkIndex++)
|
Block block = cfg[funcIndex][blkIndex];
|
||||||
|
|
||||||
|
if (maxEndAddress < block.EndAddress)
|
||||||
{
|
{
|
||||||
Block block = cfg[funcIndex][blkIndex];
|
maxEndAddress = block.EndAddress;
|
||||||
|
}
|
||||||
if (maxEndAddress < block.EndAddress)
|
|
||||||
{
|
|
||||||
maxEndAddress = block.EndAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!hasBindless)
|
||||||
|
{
|
||||||
for (int index = 0; index < block.OpCodes.Count; index++)
|
for (int index = 0; index < block.OpCodes.Count; index++)
|
||||||
{
|
{
|
||||||
if (block.OpCodes[index] is OpCodeTextureBase texture)
|
if (block.OpCodes[index] is OpCodeTextureBase texture)
|
||||||
|
|
Loading…
Reference in a new issue