0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-23 18:05:46 +00:00
ryujinx-fork/Ryujinx.Graphics.Shader/ShaderProgram.cs
Mary 97a2133207
shadertools: Prepare for new target Languages and APIs (#2465)
* shadertools: Prepare for new target Langugaes and APIs

This improves shader tools command line by adding support for target
language and api.

* Address gdkchan's comments
2021-07-18 12:49:39 +02:00

32 lines
No EOL
702 B
C#

using System;
namespace Ryujinx.Graphics.Shader
{
public class ShaderProgram
{
public ShaderStage Stage { get; }
public string Code { get; private set; }
public byte[] BinaryCode { get; }
private ShaderProgram(ShaderStage stage)
{
Stage = stage;
}
public ShaderProgram(ShaderStage stage, string code) : this(stage)
{
Code = code;
}
public ShaderProgram(ShaderStage stage, byte[] binaryCode) : this(stage)
{
BinaryCode = binaryCode;
}
public void Prepend(string line)
{
Code = line + Environment.NewLine + Code;
}
}
}