mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
implemented SPIR-V shader export
This commit is contained in:
51
AssetStudioUtility/CSspv/Instruction.cs
Normal file
51
AssetStudioUtility/CSspv/Instruction.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SpirV
|
||||
{
|
||||
public enum OperandQuantifier
|
||||
{
|
||||
/// <summary>
|
||||
/// 1
|
||||
/// </summary>
|
||||
Default,
|
||||
/// <summary>
|
||||
/// 0 or 1
|
||||
/// </summary>
|
||||
Optional,
|
||||
/// <summary>
|
||||
/// 0+
|
||||
/// </summary>
|
||||
Varying
|
||||
}
|
||||
|
||||
public class Operand
|
||||
{
|
||||
public Operand(OperandType kind, string name, OperandQuantifier quantifier)
|
||||
{
|
||||
Name = name;
|
||||
Type = kind;
|
||||
Quantifier = quantifier;
|
||||
}
|
||||
|
||||
public string Name { get; }
|
||||
public OperandType Type { get; }
|
||||
public OperandQuantifier Quantifier { get; }
|
||||
}
|
||||
|
||||
public class Instruction
|
||||
{
|
||||
public Instruction (string name)
|
||||
: this (name, new List<Operand> ())
|
||||
{
|
||||
}
|
||||
|
||||
public Instruction (string name, IReadOnlyList<Operand> operands)
|
||||
{
|
||||
Operands = operands;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public string Name { get; }
|
||||
public IReadOnlyList<Operand> Operands { get; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user