mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-16 01:36:57 +00:00
misc: chore: Use collection expressions in Shader project
This commit is contained in:
parent
a5dbcb75d0
commit
95f9e548ca
38 changed files with 198 additions and 204 deletions
|
|
@ -66,8 +66,8 @@ namespace Ryujinx.Graphics.Shader.Translation.Transforms
|
|||
setAndBinding.SetIndex,
|
||||
setAndBinding.Binding,
|
||||
1 << component,
|
||||
new[] { temp },
|
||||
new[] { vertexElemOffset }));
|
||||
[temp],
|
||||
[vertexElemOffset]));
|
||||
|
||||
if (needsSextNorm)
|
||||
{
|
||||
|
|
@ -89,8 +89,8 @@ namespace Ryujinx.Graphics.Shader.Translation.Transforms
|
|||
setAndBinding.SetIndex,
|
||||
setAndBinding.Binding,
|
||||
1,
|
||||
new[] { temp },
|
||||
new[] { vertexElemOffset }));
|
||||
[temp],
|
||||
[vertexElemOffset]));
|
||||
|
||||
if (component > 0)
|
||||
{
|
||||
|
|
@ -312,21 +312,21 @@ namespace Ryujinx.Graphics.Shader.Translation.Transforms
|
|||
|
||||
private static LinkedListNode<INode> GenerateVertexIdVertexRateLoad(ResourceManager resourceManager, LinkedListNode<INode> node, Operand dest)
|
||||
{
|
||||
Operand[] sources = new Operand[] { Const(resourceManager.LocalVertexIndexVertexRateMemoryId) };
|
||||
Operand[] sources = [Const(resourceManager.LocalVertexIndexVertexRateMemoryId)];
|
||||
|
||||
return node.List.AddBefore(node, new Operation(Instruction.Load, StorageKind.LocalMemory, dest, sources));
|
||||
}
|
||||
|
||||
private static LinkedListNode<INode> GenerateVertexIdInstanceRateLoad(ResourceManager resourceManager, LinkedListNode<INode> node, Operand dest)
|
||||
{
|
||||
Operand[] sources = new Operand[] { Const(resourceManager.LocalVertexIndexInstanceRateMemoryId) };
|
||||
Operand[] sources = [Const(resourceManager.LocalVertexIndexInstanceRateMemoryId)];
|
||||
|
||||
return node.List.AddBefore(node, new Operation(Instruction.Load, StorageKind.LocalMemory, dest, sources));
|
||||
}
|
||||
|
||||
private static LinkedListNode<INode> GenerateInstanceIdLoad(LinkedListNode<INode> node, Operand dest)
|
||||
{
|
||||
Operand[] sources = new Operand[] { Const((int)IoVariable.GlobalId), Const(1) };
|
||||
Operand[] sources = [Const((int)IoVariable.GlobalId), Const(1)];
|
||||
|
||||
return node.List.AddBefore(node, new Operation(Instruction.Load, StorageKind.Input, dest, sources));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue