mirror of
				https://github.com/Ryujinx/Ryujinx.git
				synced 2025-10-25 04:32:34 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			827 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			827 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Ryujinx.Graphics.Shader.Translation;
 | |
| using System;
 | |
| using System.IO;
 | |
| 
 | |
| namespace Ryujinx.ShaderTools
 | |
| {
 | |
|     class Program
 | |
|     {
 | |
|         static void Main(string[] args)
 | |
|         {
 | |
|             if (args.Length == 1 || args.Length == 2)
 | |
|             {
 | |
|                 TranslationFlags flags = TranslationFlags.DebugMode;
 | |
| 
 | |
|                 if (args.Length == 2 && args[0] == "--compute")
 | |
|                 {
 | |
|                     flags |= TranslationFlags.Compute;
 | |
|                 }
 | |
| 
 | |
|                 byte[] data = File.ReadAllBytes(args[args.Length - 1]);
 | |
| 
 | |
|                 string code = Translator.Translate(data, flags).Code;
 | |
| 
 | |
|                 Console.WriteLine(code);
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 Console.WriteLine("Usage: Ryujinx.ShaderTools [--compute] shader.bin");
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| } |