aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/ShaderSource.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL/ShaderSource.cs')
-rw-r--r--Ryujinx.Graphics.GAL/ShaderSource.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/ShaderSource.cs b/Ryujinx.Graphics.GAL/ShaderSource.cs
new file mode 100644
index 00000000..13b92f20
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/ShaderSource.cs
@@ -0,0 +1,29 @@
+using Ryujinx.Graphics.Shader;
+using Ryujinx.Graphics.Shader.Translation;
+
+namespace Ryujinx.Graphics.GAL
+{
+ public struct ShaderSource
+ {
+ public string Code { get; }
+ public byte[] BinaryCode { get; }
+ public ShaderStage Stage { get; }
+ public TargetLanguage Language { get; }
+
+ public ShaderSource(string code, byte[] binaryCode, ShaderStage stage, TargetLanguage language)
+ {
+ Code = code;
+ BinaryCode = binaryCode;
+ Stage = stage;
+ Language = language;
+ }
+
+ public ShaderSource(string code, ShaderStage stage, TargetLanguage language) : this(code, null, stage, language)
+ {
+ }
+
+ public ShaderSource(byte[] binaryCode, ShaderStage stage, TargetLanguage language) : this(null, binaryCode, stage, language)
+ {
+ }
+ }
+} \ No newline at end of file