| 191 | } |
| 192 | |
| 193 | void PrintUsage() |
| 194 | { |
| 195 | printf( "ShaderCompiler: compile new-style Tr2 shaders\n" ); |
| 196 | printf( "Syntax: ShaderCompiler [<options>] input_file output_file\n" ); |
| 197 | printf( "Options:\n" ); |
| 198 | printf( " /no_warnings - Do not output compile warnings\n" ); |
| 199 | printf( " /threads <thread_count> - Limit worker thread count to <thread_count>\n" ); |
| 200 | printf( " /single - Compile single permutation only\n" ); |
| 201 | printf( " /define <name> <value> - Add define (only valid with /single)\n" ); |
| 202 | printf( " /listing <listing_file> - Print DX11 HLSL output in a file\n" ); |
| 203 | printf( " /no_permutations - Ignore permutation pragmas\n" ); |
| 204 | printf( " /O{0,1,2,3} - Set optimization level. 3 is default\n" ); |
| 205 | printf( " /mtime - Determine which compiled files are out of date\n" ); |
| 206 | printf( " /Gfa - Avoid flow control constructs\n" ); |
| 207 | printf( " /Gc <switch> <path> - Compile GLSL to binary shader using external compiler\n" ); |
| 208 | printf( " /E{e,w,d}[extension] - Specify support for all or certain GLES extensions\n" ); |
| 209 | printf( " /novalidate - Skip validating converted GLSL code\n" ); |
| 210 | printf( " /permutations - Print permutations of the shader\n" ); |
| 211 | #if CCP_TELEMETRY_ENABLED |
| 212 | printf( " /telemetry - Enable RAD Telemetry\n" ); |
| 213 | #endif |
| 214 | printf( " /metal <path> - Path to Metal Developer Tools for Windows\n" ); |
| 215 | printf( " /pdb <path> - Path to output debug files\n" ); |
| 216 | printf( "input_file - Path to input HLSL file\n" ); |
| 217 | printf( "output_file - Path to output binary file\n" ); |
| 218 | } |
| 219 | |
| 220 | #include "ParserUtils.h" |
| 221 | #include "HLSLParser.h" |