aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Shader/CodeGen/Glsl/Instructions/InstGenPacking.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics/Shader/CodeGen/Glsl/Instructions/InstGenPacking.cs')
-rw-r--r--Ryujinx.Graphics/Shader/CodeGen/Glsl/Instructions/InstGenPacking.cs45
1 files changed, 0 insertions, 45 deletions
diff --git a/Ryujinx.Graphics/Shader/CodeGen/Glsl/Instructions/InstGenPacking.cs b/Ryujinx.Graphics/Shader/CodeGen/Glsl/Instructions/InstGenPacking.cs
deleted file mode 100644
index 4a40032c..00000000
--- a/Ryujinx.Graphics/Shader/CodeGen/Glsl/Instructions/InstGenPacking.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using Ryujinx.Graphics.Shader.StructuredIr;
-
-using static Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions.InstGenHelper;
-using static Ryujinx.Graphics.Shader.StructuredIr.InstructionInfo;
-
-namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
-{
- static class InstGenPacking
- {
- public static string PackHalf2x16(CodeGenContext context, AstOperation operation)
- {
- IAstNode src0 = operation.GetSource(0);
- IAstNode src1 = operation.GetSource(1);
-
- string src0Expr = GetSoureExpr(context, src0, GetSrcVarType(operation.Inst, 0));
- string src1Expr = GetSoureExpr(context, src1, GetSrcVarType(operation.Inst, 1));
-
- return $"packHalf2x16(vec2({src0Expr}, {src1Expr}))";
- }
-
- public static string UnpackHalf2x16(CodeGenContext context, AstOperation operation)
- {
- IAstNode src = operation.GetSource(0);
-
- string srcExpr = GetSoureExpr(context, src, GetSrcVarType(operation.Inst, 0));
-
- return $"unpackHalf2x16({srcExpr}){GetMask(operation.ComponentMask)}";
- }
-
- private static string GetMask(int compMask)
- {
- string mask = ".";
-
- for (int index = 0; index < 2; index++)
- {
- if ((compMask & (1 << index)) != 0)
- {
- mask += "xy".Substring(index, 1);
- }
- }
-
- return mask;
- }
- }
-} \ No newline at end of file