Implement Viewport Transform Disable (#3328)
* Initial implementation (no specialization) * Use specialization * Fix render scale, increase code gen version * Revert accidental change * Address Feedback
This commit is contained in:
parent
92ca1cb0cb
commit
43b4b34376
24 changed files with 200 additions and 26 deletions
|
@ -206,7 +206,33 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
|||
|
||||
if (emit)
|
||||
{
|
||||
context.EmitVertex();
|
||||
if (context.Config.LastInVertexPipeline)
|
||||
{
|
||||
context.PrepareForVertexReturn(out var tempXLocal, out var tempYLocal, out var tempZLocal);
|
||||
|
||||
context.EmitVertex();
|
||||
|
||||
// Restore output position value before transformation.
|
||||
|
||||
if (tempXLocal != null)
|
||||
{
|
||||
context.Copy(Attribute(AttributeConsts.PositionX), tempXLocal);
|
||||
}
|
||||
|
||||
if (tempYLocal != null)
|
||||
{
|
||||
context.Copy(Attribute(AttributeConsts.PositionY), tempYLocal);
|
||||
}
|
||||
|
||||
if (tempZLocal != null)
|
||||
{
|
||||
context.Copy(Attribute(AttributeConsts.PositionZ), tempZLocal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
context.EmitVertex();
|
||||
}
|
||||
}
|
||||
|
||||
if (cut)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue