aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-04-08 07:42:39 -0300
committerGitHub <noreply@github.com>2022-04-08 12:42:39 +0200
commite44a43c7e1ee0b25ef93a9419dbd6ac2eb7665b5 (patch)
treed0587a15710c0d7a525117c22304e717b7fea2ec /Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs
parent3139a85a2b8e83aa6babfbc683bd46ca1d75e448 (diff)
Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling (#3251)1.1.99
* Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling * Shader cache version bump * Fix typo
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Instructions/InstEmitAttribute.cs9
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));
}