diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs index e2131602..1cdb3842 100644 --- a/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs +++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs @@ -168,10 +168,11 @@ namespace Ryujinx.Graphics.Shader.Instructions { InstIsberd op = context.GetOp<InstIsberd>(); - // This instruction performs a load from ISBE memory, - // however it seems to be only used to get some vertex - // input data, so we instead propagate the offset so that - // it can be used on the attribute load. + // This instruction performs a load from ISBE (Internal Stage Buffer Entry) memory. + // Here, we just propagate the offset, as the result from this instruction is usually + // used with ALD to perform vertex load on geometry or tessellation shaders. + // The offset is calculated as (PrimitiveIndex * VerticesPerPrimitive) + VertexIndex. + // Since we hardcode PrimitiveIndex to zero, then the offset will be just VertexIndex. context.Copy(GetDest(op.Dest), GetSrcReg(context, op.SrcA)); } |