Usage:
slangc [options...] [--] <input files>
# For help
slangc -h
# To generate this file
slangc -help-style markdown -h
- General
- Target
- Downstream
- Debugging
- Repro
- Experimental
- Internal
- Deprecated
- compiler
- language
- language-version
- archive-type
- line-directive-mode
- debug-info-format
- fp-mode
- fp-denormal-mode
- help-style
- optimization-level
- debug-level
- file-system-type
- source-embed-style
- target
- stage
- vulkan-shift
- capability
- file-extension
- help-category
General options
-D<name>[=<value>], -D <name>[=<value>]
Insert a preprocessor macro.
The space between - D and <name> is optional. If no <value> is specified, Slang will define the macro with an empty value.
-depfile <path>
Save the source file dependency list in a file.
-entry <name>
Specify the name of an entry-point function.
When compiling from a single file, this defaults to main if you specify a stage using -stage.
Multiple -entry options may be used in a single invocation. When they do, the file associated with the entry point will be the first one found when searching to the left in the command line.
If no -entry options are given, compiler will use [shader(...)] attributes to detect entry points.
-specialize <typename>
Specialize the last entrypoint with <typename>.
Emit IR typically as a '.slang-module' when outputting to a container.
-h or -h <help-category>
Print this message, or help in specified category.
-help-style <help-style>
Help formatting style
-I<path>, -I <path>
Add a path to be used in resolving '#include' and 'import' operations.
-lang <language>
Set the language for the following input files.
Set the default matrix layout to column-major.
Set the default matrix layout to row-major.
Many capability warnings will become an error.
Do not warn or error if capabilities are violated
Perform minimum code optimization in Slang to favor compilation time.
Disable non-essential IR validations such as use of uninitialized variables.
Disable source mapping in the Obfuscation.
-module-name <name>
Set the module name to use when compiling multiple .slang source files into a single module.
-o <path>
Specify a path where generated output should be written.
If no -target or -stage is specified, one may be inferred from file extension (see <file-extension>). If multiple -target options and a single -entry are present, each -o associates with the first -target to its left. Otherwise, if multiple -entry options are present, each -o associates with the first -entry to its left, and with the -target that matches the one inferred from <path>.
-profile <profile>[+<capability>...]
Specify the shader profile for code generation.
Accepted profiles are:
-
sm_{4_0,4_1,5_0,5_1,6_0,6_1,6_2,6_3,6_4,6_5,6_6,6_7,6_8,6_9,6_10}
-
glsl_{110,120,130,140,150,330,400,410,420,430,440,450,460}
Additional profiles that include -stage information:
- {vs,hs,ds,gs,ps}_<version>
See -capability for information on <capability>
When multiple -target options are present, each -profile associates with the first -target to its left.
-stage <stage>
Specify the stage of an entry-point function.
When multiple -entry options are present, each -stage associated with the first -entry to its left.
May be omitted if entry-point function has a [shader(...)] attribute; otherwise required for each -entry option.
-target <target>
Specifies the format in which code should be generated.
Display the build version. This is the contents of git describe --tags.
It is typically only set from automated builds(such as distros available on github).A user build will by default be 'unknown'.
-std <language-version>
Specifies the language standard that should be used.
-warnings-as-errors all or -warnings-as-errors <id>[,<id>...]
all - Treat all warnings as errors.
<id>[,<id>...]: Treat specific warning ids as errors.
-warnings-disable <id>[,<id>...]
Disable specific warning ids.
-W<id>
Enable a warning with the specified id.
-Wno-<id>
Disable warning with <id>
Dump to output list of warning diagnostic numeric and name ids.
Treat the rest of the command line as input files.
Reports the time spent in the downstream compiler.
Reports compiler performance benchmark results.
Reports compiler performance benchmark results for each intermediate pass (implies -report-perf-benchmark).
Reports information about checkpoint contexts used for reverse-mode automatic differentiation.
Reports information about dynamic dispatch sites for interface calls.
Skips spirv validation.
-source-embed-style <source-embed-style>
If source embedding is enabled, defines the style used. When enabled (with any style other than none), will write compile results into embeddable source for the target language. If no output file is specified, the output is written to stdout. If an output file is specified it is written either to that file directly (if it is appropriate for the target language), or it will be output to the filename with an appropriate extension.
Note for C/C++ with u16/u32/u64 types it is necessary to have "#include <stdint.h>" before the generated file.
-source-embed-name <name>
The name used as the basis for variables output for source embedding.
-source-embed-language <language>
The language to be used for source embedding. Defaults to C/C++. Currently only C/C++ are supported
Disable short-circuiting for "&&" and "||" operations
Treat enums types as unscoped by default.
Preserve all resource parameters in the output code, even if they are not used by the shader.
-conformance <typeName>:<interfaceName>[=<sequentialID>]
Include additional type conformance during linking for dynamic dispatch.
-reflection-json <path>
Emit reflection data in JSON format to a file.
Pack bitfields according to MSVC rules (msb first, new field when underlying type size changes) rather than gcc-style (lsb first)
Target code generation options
-capability <capability>[+<capability>...]
Add optional capabilities to a code generation target. See Capabilities below.
Set the format of R/W images with unspecified format to 'unknown'. Otherwise try to guess the format.
Disables generating dynamic dispatch code.
Disables generics and specialization pass.
-fp-mode <fp-mode>, -floating-point-mode <fp-mode>
Control floating point optimizations
-denorm-mode-fp16 <fp-denormal-mode>
Control handling of 16-bit denormal floating point values in SPIR-V (any, preserve, ftz)
-denorm-mode-fp32 <fp-denormal-mode>
Control handling of 32-bit denormal floating point values in SPIR-V and DXIL (any, preserve, ftz)
-denorm-mode-fp64 <fp-denormal-mode>
Control handling of 64-bit denormal floating point values in SPIR-V (any, preserve, ftz)
-g, -g<debug-info-format>, -g<debug-level>
Include debug information in the generated code, where possible.
<debug-level> is the amount of information, 0..3, unspecified means 2
<debug-info-format> specifies a debugging info format
It is valid to have multiple -g options, such as a <debug-level> and a <debug-info-format>
-line-directive-mode <line-directive-mode>
Sets how the #line directives should be produced. Available options are:
If not specified, default behavior is to use C-style #line directives for HLSL and C/C++ output, and traditional GLSL-style #line directives for GLSL output.
Set the optimization level.
Remove all source file information from outputs.
Make data accessed through ConstantBuffer, ParameterBlock, StructuredBuffer, ByteAddressBuffer and general pointers follow the 'scalar' layout when targeting GLSL or SPIRV.
Pack members using FXCs member packing rules when targeting GLSL or SPIRV.
Make data accessed through ConstantBuffer, ParameterBlock, StructuredBuffer, ByteAddressBuffer and general pointers follow the C/C++ structure layout rules when targeting SPIRV.
-fvk-<vulkan-shift>-shift <N> <space>
For example '-fvk-b-shift <N> <space>' shifts by N the inferred binding numbers for all resources in 'b' registers of space <space>. For a resource attached with :register(bX, <space>) but not [vk::binding(...)], sets its Vulkan descriptor set to <space> and binding number to X + N. If you need to shift the inferred binding numbers for more than one space, provide more than one such option. If more than one such option is provided for the same space, the last one takes effect. If you need to shift the inferred binding numbers for all sets, use 'all' as <space>.
Links:
-fvk-bind-globals <N> <descriptor-set>
Places the $Globals cbuffer at descriptor set <descriptor-set> and binding <N>.
It lets you specify the descriptor for the source at a certain register.
Links:
Negates (additively inverts) SV_Position.y before writing to stage output.
Reciprocates (multiplicatively inverts) SV_Position.w after reading from stage input. For use in fragment shaders only.
Uses the entrypoint name from the source instead of 'main' in the spirv output.
Use std430 layout instead of D3D buffer layout for raw buffer load/stores.
Include reflection decorations in the resulting SPIRV for shader parameters.
Enables support for legacy effect annotation syntax.
Generate SPIR-V output by compiling generated GLSL with glslang
Generate SPIR-V output directly (default)
A path to a specific spirv.core.grammar.json to use when generating SPIR-V output
Allow generating code from incomplete libraries with unresolved external functions
-bindless-space-index <index>
Specify the space index for the system defined global bindless resource array.
-spirv-resource-heap-stride <stride>
Specify the byte stride for the resource descriptor heap when generating SPIRV with spvDescriptorHeapEXT. Defaults to 0, which will use OpConstantSizeOfEXT(ResourceType).
-spirv-sampler-heap-stride <stride>
Specify the byte stride for the sampler descriptor heap when generating SPIRV with spvDescriptorHeapEXT. Defaults to 0, which will use OpConstantSizeOfEXT(OpTypeSampler).
Emit debug data to a separate file, and strip it from the main output file.
Generate CPU targets using C++ (default)
Generate CPU targets using LLVM
-llvm-target-triple <target triple>
Sets the target triple for the LLVM target, enabling cross compilation. The default value is the host platform.
-llvm-cpu <cpu name>
Sets the target CPU for the LLVM target, enabling the extensions and features of that CPU. The default value is "generic".
-llvm-features <a1,+enable,-disable,...>
Sets a comma-separates list of architecture-specific features for the LLVM targets.
Downstream compiler options
-<compiler>-path <path>
Specify path to a downstream <compiler> executable or library.
-default-downstream-compiler <language> <compiler>
Set a default compiler for the given language. See -lang for the list of languages.
-X<compiler> <option> -X<compiler>... <options> -X.
Pass arguments to downstream <compiler>. Just -X<compiler> passes just the next argument to the downstream compiler. -X<compiler>... options -X. will pass all of the options inbetween the opening -X and -X. to the downstream compiler.
-pass-through <compiler>
Pass the input through mostly unmodified to the existing compiler <compiler>.
These are intended for debugging/testing purposes, when you want to be able to see what these existing compilers do with the "same" input and options
Compiler debugging/instrumentation options
Dump the AST to a .slang-ast file next to the input.
-dump-intermediate-prefix <prefix>
File name prefix for -dump-intermediates outputs, default is no prefix
Dump intermediate outputs for debugging.
Dump the IR after every pass for debugging.
Dump the IDs with -dump-ir (debug builds only)
Output the preprocessing result and exit.
Skip the code generation step, just check the code and generate layout.
Print the hierarchy of the processed source files.
[REMOVED] Serialize the IR between front-end and back-end.
Skip the code generation phase.
Validate the IR after select intermediate passes.
Perform debug validation on IR after each intermediate pass.
-dump-ir-before <pass-names>
Dump IR before specified pass, may be specified more than once
-dump-ir-after <pass-names>
Dump IR after specified pass, may be specified more than once
When displaying diagnostic output aim to display more detailed path information. In practice this is typically the complete 'canonical' path to the source file used.
Verify IR in the front-end.
Disassemble and print the module IR.
Print the name and version of a serialized IR Module
Print the minimum and maximum module versions this compiler supports
Slang repro system related
Dump .slang-repro file on any compilation error.
-extract-repro <name>
Extract the repro files into a folder.
-load-repro-directory <path>
Use repro along specified path
-load-repro <name>
Load repro
-repro-file-system <name>
Use a repro as a file system
Dump a .slang-repro file that can be used to reproduce a compilation on another machine.
**Specify a directory to use if a file isn't found in a repro. Should be specified before any repro usage such as load-repro.
There are two special directories:
- 'none:' indicates no fallback, so if the file isn't found in the repro compliation will fail
- 'default:' is the default (which is the OS file system)**
Experimental options (use at your own risk)
-file-system <file-system-type>
Set the filesystem hook to use for a compile request.
Output heterogeneity-related code.
Do as little mangling of names as possible.
Do not include explicit parameter binding semantics in the output HLSL code,except for parameters that has explicit bindings in the input source.
Do not pack elements of constant buffers into structs in the output HLSL code.
Perform uniformity validation analysis.
Enable GLSL as an input language.
Enable experimental compiler passes
Enable experimental dynamic dispatch features
Embed downstream IR into emitted slang IR
Enable experimental features (loading builtin neural module)
Enable experimental rich diagnostics with enhanced formatting and details
Enable machine-readable diagnostic output in tab-separated format
-diagnostic-color <always|never|auto>
Control colored diagnostic output (auto uses color if stderr is a tty)
Internal-use options (use at your own risk)
-archive-type <archive-type>
Set the archive type for -save-core-module. Default is zip.
Compile the core module from embedded sources. Will return a failure if there is already a core module available.
Write documentation for -compile-core-module
-ir-compression <type>
Set compression for IR and AST outputs.
Accepted compression types: none, lite
-load-core-module <filename>
Load the core module from file.
-r <name>
reference module <name>
-save-core-module <filename>
Save the core module to an archive file.
-save-core-module-bin-source <filename>
Same as -save-core-module but output the data as a C array.
-save-glsl-module-bin-source <filename>
Save the serialized glsl module as a C array.
Enable liveness tracking. Places SLANG_LIVE_START, and SLANG_LIVE_END in output source to indicate value liveness.
Enable loop inversion in the code-gen optimization. Default is off
Generate code for all entry points in a single output (library mode).
Deprecated options (allowed but ignored; may be removed in future)
Parameter blocks will use register spaces
Initialize all variables to zero.Structs will set all struct-fields without an init expression to 0.All variables will call their default constructor if not explicitly initialized as usual.
Downstream Compilers (aka Pass through)
none: Unknownfxc: FXC HLSL compilerdxc: DXC HLSL compilerglslang: GLSLANG GLSL compilerspirv-dis: spirv-tools SPIRV disassemblerclang: Clang C/C++ compilervisualstudio,vs: Visual Studio C/C++ compilergcc: GCC C/C++ compilergenericcpp,c,cpp: A generic C++ compiler (can be any one of visual studio, clang or gcc depending on system and availability)nvrtc: NVRTC CUDA compilerllvm: LLVM/Clangslang-llvmspirv-opt: spirv-tools SPIRV optimizermetal: Metal shader compilertint: Tint compiler
Language
c,C: C languagecpp,c++,C++,cxx: C++ languageslang: Slang languageglsl: GLSL languagehlsl: HLSL languagecu,cuda: CUDA
Language Version
legacy,default,2018: Legacy Slang language2025: Slang language rules for 2025 and older2026,latest: Slang language rules for 2026 and newer
Archive Type
riff-deflate: Slang RIFF using deflate compressionriff-lz4: Slang RIFF using LZ4 compressionzip: Zip fileriff: Slang RIFF without compression
Line Directive Mode
none: Don't emit#linedirectives at allsource-map: Use source map to track line associations (doen't emit #line)default: Default behaviorstandard: Emit standard C-style#linedirectives.glsl: Emit GLSL-style directives with file number instead of name.
Debug Info Format
default-format: Use the default debugging format for the targetc7: CodeView C7 format (typically means debugging infomation is embedded in the binary)pdb: Program databasestabs: STABS debug formatcoff: COFF debug formatdwarf: DWARF debug format
Floating Point Mode
precise: Disable optimization that could change the output of floating-point computations, including around infinities, NaNs, denormalized values, and negative zero. Prefer the most precise versions of special functions supported by the target.fast: Allow optimizations that may change results of floating-point computations. Prefer the fastest version of special functions supported by the target.default: Default floating point mode
Floating Point Denormal Handling Mode
any: Use any denormal handling mode (default). The mode used is implementation defined.preserve: Preserve denormal valuesftz: Flush denormals to zero
Help Style
text: Text suitable for output to a terminalmarkdown: Markdownno-link-markdown: Markdown without links
Optimization Level
0,none: Disable all optimizations1,default: Enable a default level of optimization.This is the default if no -O options are used.2,high: Enable aggressive optimizations for speed.3,maximal: Enable further optimizations, which might have a significant impact on compile time, or involve unwanted tradeoffs in terms of code size.
Debug Level
0,none: Don't emit debug information at all.1,minimal: Emit as little debug information as possible, while still supporting stack traces.2,standard: Emit whatever is the standard level of debug information for each target.3,maximal: Emit as much debug information as possible for each target.
File System Type
default: Default file system.load-file: Just implements loadFile interface, so will be wrapped with CacheFileSystem internally.os: Use the OS based file system directly (without file system caching)
Source Embed Style
none: No source level embeddingdefault: The default embedding for the type to be embeddedtext: Embed as text. May change line endings. If output isn't text will use 'default'. Size will not contain terminating 0.binary-text: Embed as text assuming contents is binary.u8: Embed as unsigned bytes.u16: Embed as uint16_t.u32: Embed as uint32_t.u64: Embed as uint64_t.
Target
unknownnonehlsl: HLSL source codedxbc: DirectX shader bytecode binarydxbc-asm,dxbc-assembly: DirectX shader bytecode assemblydxil: DirectX Intermediate Language binarydxil-asm,dxil-assembly: DirectX Intermediate Language assemblyglsl: GLSL(Vulkan) source codespirv: SPIR-V binaryspirv-asm,spirv-assembly: SPIR-V assemblyc: C source codecpp,c++,cxx: C++ source codehpp: C++ source headertorch,torch-binding,torch-cpp,torch-cpp-binding: C++ for pytorch bindinghost-cpp,host-c++,host-cxx: C++ source for host executionexe,executable: Executable binaryshader-sharedlib,shader-sharedlibrary,shader-dll: Shared library/Dll for shader kernelsharedlib,sharedlibrary,dll: Shared library/Dll for host executioncuda,cu: CUDA source codecuh: CUDA source headerptx: PTX assemblycuobj,cubin: CUDA binaryhost-callable,callable: Host callableobject-code,shader-object-code: Object code for host execution (shader style)host-host-callable: Host callable for host executionmetal: Metal shader sourcemetallib: Metal Library Bytecodemetallib-asm: Metal Library Bytecode assemblywgsl: WebGPU shading language sourcewgsl-spirv-asm,wgsl-spirv-assembly: SPIR-V assembly via WebGPU shading languagewgsl-spirv: SPIR-V via WebGPU shading languageslangvm,slang-vm: Slang VM byte codehost-object-code: Object code for host execution (host style)llvm-host-ir,llvm-ir: LLVM IR assembly (host style)llvm-shader-ir: LLVM IR assembly (shader style)
Stage
vertexhull,tesscontroldomain,tessevalgeometrypixel,fragmentcomputeraygenerationintersectionanyhitclosesthitmisscallablemeshamplification,taskdispatch
Vulkan Shift
b: Constant buffer views: Samplert: Shader resource viewu: Unorderd access view
A capability describes an optional feature that a target may or may not support. When a -capability is specified, the compiler may assume that the target supports that capability, and generate code accordingly.
spirv_1_{ 0,1,2,3,4,5 }: minimum supported SPIR - V versiontextualTargethlslglslccppcudametalspirvwgslslangvmllvmglsl_spirv_1_0glsl_spirv_1_1glsl_spirv_1_2glsl_spirv_1_3glsl_spirv_1_4glsl_spirv_1_5glsl_spirv_1_6metallib_2_3metallib_2_4metallib_3_0metallib_3_1metallib_4_0hlsl_nvapihlsl_2018optix_coopvecoptix_multilevel_traversalvertexfragmentcomputehulldomaingeometrydispatchSPV_EXT_fragment_shader_interlock: enables the SPV_EXT_fragment_shader_interlock extensionSPV_EXT_physical_storage_buffer: enables the SPV_EXT_physical_storage_buffer extensionSPV_EXT_fragment_fully_covered: enables the SPV_EXT_fragment_fully_covered extensionSPV_EXT_descriptor_indexing: enables the SPV_EXT_descriptor_indexing extensionSPV_EXT_shader_atomic_float_add: enables the SPV_EXT_shader_atomic_float_add extensionSPV_EXT_shader_atomic_float16_add: enables the SPV_EXT_shader_atomic_float16_add extensionSPV_EXT_shader_atomic_float_min_max: enables the SPV_EXT_shader_atomic_float_min_max extensionSPV_EXT_mesh_shader: enables the SPV_EXT_mesh_shader extensionSPV_EXT_demote_to_helper_invocation: enables the SPV_EXT_demote_to_helper_invocation extensionSPV_KHR_maximal_reconvergence: enables the SPV_KHR_maximal_reconvergence extensionSPV_KHR_quad_control: enables the SPV_KHR_quad_control extensionSPV_KHR_fragment_shader_barycentric: enables the SPV_KHR_fragment_shader_barycentric extensionSPV_KHR_non_semantic_info: enables the SPV_KHR_non_semantic_info extensionSPV_KHR_device_group: enables the SPV_KHR_device_group extensionSPV_KHR_variable_pointers: enables the SPV_KHR_variable_pointers extensionSPV_KHR_ray_tracing: enables the SPV_KHR_ray_tracing extensionSPV_KHR_ray_query: enables the SPV_KHR_ray_query extensionSPV_KHR_ray_tracing_position_fetch: enables the SPV_KHR_ray_tracing_position_fetch extensionSPV_KHR_shader_clock: enables the SPV_KHR_shader_clock extensionSPV_NV_shader_subgroup_partitioned: enables the SPV_NV_shader_subgroup_partitioned extensionSPV_KHR_subgroup_rotate: enables the SPV_KHR_subgroup_rotate extensionSPV_NV_ray_tracing_motion_blur: enables the SPV_NV_ray_tracing_motion_blur extensionSPV_EXT_shader_invocation_reorder: enables the SPV_EXT_shader_invocation_reorder extensionSPV_NV_shader_invocation_reorder: enables the SPV_NV_shader_invocation_reorder extensionSPV_NV_cluster_acceleration_structure: enables the SPV_NV_cluster_acceleration_structure extensionSPV_NV_linear_swept_spheres: enables the SPV_NV_linear_swept_spheres extensionSPV_NV_shader_image_footprint: enables the SPV_NV_shader_image_footprint extensionSPV_KHR_compute_shader_derivatives: enables the SPV_KHR_compute_shader_derivatives extensionSPV_GOOGLE_user_type: enables the SPV_GOOGLE_user_type extensionSPV_EXT_replicated_composites: enables the SPV_EXT_replicated_composites extensionSPV_KHR_vulkan_memory_model: enables the SPV_KHR_vulkan_memory_model extensionSPV_NV_cooperative_vector: enables the SPV_NV_cooperative_vector extensionSPV_KHR_cooperative_matrix: enables the SPV_KHR_cooperative_matrix extensionSPV_NV_tensor_addressing: enables the SPV_NV_tensor_addressing extensionSPV_NV_cooperative_matrix2: enables the SPV_NV_cooperative_matrix2 extensionSPV_NV_bindless_texture: enables the SPV_NV_bindless_texture extensionSPV_EXT_float8: enables the SPV_EXT_float8 extensionSPV_EXT_descriptor_heap: enables the SPV_EXT_descriptor_heap extensionSPV_KHR_untyped_pointers: enables the SPV_KHR_untyped_pointers extensionSPV_KHR_bfloat16: enables the SPV_KHR_bfloat16 extensionspvDeviceGroupspvAtomicFloat32AddEXTspvAtomicFloat16AddEXTspvAtomicFloat64AddEXTspvInt64AtomicsspvAtomicFloat32MinMaxEXTspvAtomicFloat16MinMaxEXTspvAtomicFloat64MinMaxEXTspvDerivativeControlspvImageQueryspvImageGatherExtendedspvSparseResidencyspvImageFootprintNVspvMinLodspvFloat8EXTspvBFloat16KHRspvFragmentShaderPixelInterlockEXTspvFragmentBarycentricKHRspvFragmentFullyCoveredEXTspvGroupNonUniformspvGroupNonUniformBallotspvGroupNonUniformShufflespvGroupNonUniformShuffleRelativespvGroupNonUniformClusteredspvGroupNonUniformArithmeticspvGroupNonUniformQuadspvGroupNonUniformVotespvGroupNonUniformPartitionedNVspvGroupNonUniformRotateKHRspvRayTracingMotionBlurNVspvMeshShadingEXTspvRayTracingKHRspvRayTracingPositionFetchKHRspvRayQueryKHRspvRayQueryPositionFetchKHRspvShaderInvocationReorderEXTspvShaderInvocationReorderNVspvRayTracingClusterAccelerationStructureNVspvRayTracingLinearSweptSpheresGeometryNVspvShaderClockKHRspvShaderNonUniformEXTspvShaderNonUniformspvDemoteToHelperInvocationEXTspvDemoteToHelperInvocationspvReplicatedCompositesEXTspvCooperativeVectorNVspvCooperativeVectorTrainingNVspvCooperativeMatrixKHRspvCooperativeMatrixReductionsNVspvCooperativeMatrixConversionsNVspvCooperativeMatrixPerElementOperationsNVspvCooperativeMatrixTensorAddressingNVspvCooperativeMatrixBlockLoadsNVspvTensorAddressingNVspvMaximalReconvergenceKHRspvQuadControlKHRspvVulkanMemoryModelKHRspvVulkanMemoryModelDeviceScopeKHRspvBindlessTextureNVspvDescriptorHeapEXTser_hlsl_nativemetallib_latestdxil_libany_targetany_textual_targetany_gfx_targetany_cpp_targetcpp_cudacpp_llvmcpp_cuda_llvmcpp_cuda_spirvcpp_cuda_spirv_llvmcpp_cuda_metal_spirvcuda_spirvcpp_cuda_glsl_spirvcpp_cuda_glsl_hlslcpp_cuda_glsl_hlsl_llvmcpp_cuda_glsl_hlsl_spirvcpp_cuda_glsl_hlsl_spirv_llvmcpp_cuda_glsl_hlsl_spirv_wgslcpp_cuda_glsl_hlsl_spirv_wgsl_llvmcpp_cuda_glsl_hlsl_metal_spirvcpp_cuda_glsl_hlsl_metal_spirv_llvmcpp_cuda_glsl_hlsl_metal_spirv_wgslcpp_cuda_glsl_hlsl_metal_spirv_wgsl_llvmcpp_cuda_hlslcpp_cuda_hlsl_spirvcpp_cuda_hlsl_metal_spirvcpp_glslcpp_glsl_hlsl_spirvcpp_glsl_hlsl_spirv_wgslcpp_glsl_hlsl_metal_spirvcpp_glsl_hlsl_metal_spirv_wgslcpp_hlslcuda_glsl_hlslcuda_hlsl_metal_spirvcuda_glsl_hlsl_spirvcuda_glsl_hlsl_spirv_llvmcuda_glsl_hlsl_spirv_wgslcuda_glsl_hlsl_metal_spirvcuda_glsl_hlsl_metal_spirv_wgslcuda_glsl_spirvcuda_glsl_metal_spirvcuda_glsl_metal_spirv_wgslcuda_glsl_metal_spirv_wgsl_llvmcuda_hlslcuda_hlsl_spirvglsl_hlsl_spirvglsl_hlsl_spirv_wgslglsl_hlsl_metal_spirvglsl_hlsl_metal_spirv_wgslglsl_metal_spirvglsl_metal_spirv_wgslglsl_spirvglsl_spirv_wgslhlsl_spirvSPV_NV_compute_shader_derivatives: enables the SPV_NV_compute_shader_derivatives extensionspvShaderInvocationReorderMotionNVspvShaderInvocationReorderMotionEXTGL_EXT_buffer_reference: enables the GL_EXT_buffer_reference extensionGL_EXT_buffer_reference_uvec2: enables the GL_EXT_buffer_reference_uvec2 extensionGL_EXT_debug_printf: enables the GL_EXT_debug_printf extensionGL_EXT_demote_to_helper_invocation: enables the GL_EXT_demote_to_helper_invocation extensionGL_EXT_maximal_reconvergence: enables the GL_EXT_maximal_reconvergence extensionGL_EXT_shader_quad_control: enables the GL_EXT_shader_quad_control extensionGL_EXT_device_group: enables the GL_EXT_device_group extensionGL_EXT_fragment_shader_barycentric: enables the GL_EXT_fragment_shader_barycentric extensionGL_EXT_mesh_shader: enables the GL_EXT_mesh_shader extensionGL_EXT_nonuniform_qualifier: enables the GL_EXT_nonuniform_qualifier extensionGL_EXT_ray_query: enables the GL_EXT_ray_query extensionGL_EXT_ray_tracing: enables the GL_EXT_ray_tracing extensionGL_EXT_ray_tracing_position_fetch_ray_tracing: enables the GL_EXT_ray_tracing_position_fetch_ray_tracing extensionGL_EXT_ray_tracing_position_fetch_ray_query: enables the GL_EXT_ray_tracing_position_fetch_ray_query extensionGL_EXT_ray_tracing_position_fetch: enables the GL_EXT_ray_tracing_position_fetch extensionGL_EXT_samplerless_texture_functions: enables the GL_EXT_samplerless_texture_functions extensionGL_EXT_shader_atomic_float: enables the GL_EXT_shader_atomic_float extensionGL_EXT_shader_atomic_float_min_max: enables the GL_EXT_shader_atomic_float_min_max extensionGL_EXT_shader_atomic_float2: enables the GL_EXT_shader_atomic_float2 extensionGL_EXT_shader_atomic_int64: enables the GL_EXT_shader_atomic_int64 extensionGL_EXT_shader_explicit_arithmetic_types: enables the GL_EXT_shader_explicit_arithmetic_types extensionGL_EXT_shader_explicit_arithmetic_types_int64: enables the GL_EXT_shader_explicit_arithmetic_types_int64 extensionGL_EXT_shader_image_load_store: enables the GL_EXT_shader_image_load_store extensionGL_EXT_shader_realtime_clock: enables the GL_EXT_shader_realtime_clock extensionGL_EXT_texture_query_lod: enables the GL_EXT_texture_query_lod extensionGL_EXT_texture_shadow_lod: enables the GL_EXT_texture_shadow_lod extensionGL_ARB_derivative_control: enables the GL_ARB_derivative_control extensionGL_ARB_fragment_shader_interlock: enables the GL_ARB_fragment_shader_interlock extensionGL_ARB_gpu_shader5: enables the GL_ARB_gpu_shader5 extensionGL_ARB_shader_image_load_store: enables the GL_ARB_shader_image_load_store extensionGL_ARB_shader_image_size: enables the GL_ARB_shader_image_size extensionGL_ARB_texture_multisample: enables the GL_ARB_texture_multisample extensionGL_ARB_shader_texture_image_samples: enables the GL_ARB_shader_texture_image_samples extensionGL_ARB_sparse_texture: enables the GL_ARB_sparse_texture extensionGL_ARB_sparse_texture2: enables the GL_ARB_sparse_texture2 extensionGL_ARB_sparse_texture_clamp: enables the GL_ARB_sparse_texture_clamp extensionGL_ARB_texture_gather: enables the GL_ARB_texture_gather extensionGL_ARB_texture_query_levels: enables the GL_ARB_texture_query_levels extensionGL_ARB_shader_clock: enables the GL_ARB_shader_clock extensionGL_ARB_shader_clock64: enables the GL_ARB_shader_clock64 extensionGL_ARB_gpu_shader_int64: enables the GL_ARB_gpu_shader_int64 extensionGL_KHR_memory_scope_semantics: enables the GL_KHR_memory_scope_semantics extensionGL_KHR_shader_subgroup_arithmetic: enables the GL_KHR_shader_subgroup_arithmetic extensionGL_KHR_shader_subgroup_ballot: enables the GL_KHR_shader_subgroup_ballot extensionGL_KHR_shader_subgroup_basic: enables the GL_KHR_shader_subgroup_basic extensionGL_KHR_shader_subgroup_clustered: enables the GL_KHR_shader_subgroup_clustered extensionGL_KHR_shader_subgroup_quad: enables the GL_KHR_shader_subgroup_quad extensionGL_KHR_shader_subgroup_shuffle: enables the GL_KHR_shader_subgroup_shuffle extensionGL_KHR_shader_subgroup_shuffle_relative: enables the GL_KHR_shader_subgroup_shuffle_relative extensionGL_KHR_shader_subgroup_vote: enables the GL_KHR_shader_subgroup_vote extensionGL_KHR_shader_subgroup_rotate: enables the GL_KHR_shader_subgroup_rotate extensionGL_NV_compute_shader_derivatives: enables the GL_NV_compute_shader_derivatives extensionGL_NV_fragment_shader_barycentric: enables the GL_NV_fragment_shader_barycentric extensionGL_NV_gpu_shader5: enables the GL_NV_gpu_shader5 extensionGL_NV_ray_tracing: enables the GL_NV_ray_tracing extensionGL_NV_ray_tracing_motion_blur: enables the GL_NV_ray_tracing_motion_blur extensionGL_NV_shader_atomic_fp16_vector: enables the GL_NV_shader_atomic_fp16_vector extensionGL_NV_shader_invocation_reorder: enables the GL_NV_shader_invocation_reorder extensionGL_EXT_shader_invocation_reorder: enables the GL_EXT_shader_invocation_reorder extensionGL_NV_shader_invocation_reorder_motion: enables the GL_NV_shader_invocation_reorder_motion extensionGL_EXT_shader_invocation_reorder_motion: enables the GL_EXT_shader_invocation_reorder_motion extensionGL_NV_shader_subgroup_partitioned: enables the GL_NV_shader_subgroup_partitioned extensionGL_NV_shader_texture_footprint: enables the GL_NV_shader_texture_footprint extensionGL_NV_cluster_acceleration_structure: enables the GL_NV_cluster_acceleration_structure extensionGL_NV_cooperative_vector: enables the GL_NV_cooperative_vector extensionnvapiraytracingser_nvapiser_dxrserser_nvmotionblur_nvrayqueryraytracing_motionblurser_motionser_nv_motionshaderclockfragmentshaderinterlockatomic64atomicfloatatomicfloat2fragmentshaderbarycentricshadermemorycontrolbufferreferencebufferreference_int64cooperative_vectorcooperative_vector_trainingcooperative_matrixcooperative_matrix_spirvcooperative_matrix_reductioncooperative_matrix_conversioncooperative_matrix_map_elementcooperative_matrix_tensor_addressingcooperative_matrix_block_loadtensor_addressingcooperative_matrix_2vk_mem_modelmem_modeldescriptor_handlepixeltesscontroltessevalraygenraygenerationintersectionanyhitclosesthitcallablemissmeshtaskamplificationany_stageamplification_meshraytracing_stagesanyhit_closesthitanyhit_intersectionraygen_closesthit_missanyhit_closesthit_intersectionanyhit_closesthit_intersection_missraygen_closesthit_miss_callablecompute_tesscontrol_tessevalcompute_fragmentcompute_fragment_geometry_vertexdomain_hullraytracingstages_fragmentraytracingstages_computeraytracingstages_compute_amplification_meshraytracingstages_compute_fragmentraytracingstages_compute_fragment_geometry_vertexmeshshadingshadermemorycontrol_computesubpassspirv_latestSPIRV_1_0SPIRV_1_1SPIRV_1_2SPIRV_1_3SPIRV_1_4SPIRV_1_5SPIRV_1_6sm_4_0_versionsm_4_0sm_4_1_versionsm_4_1sm_5_0_versionsm_5_0sm_5_1_versionsm_5_1sm_6_0_versionsm_6_0sm_6_1_versionsm_6_1sm_6_2_versionsm_6_2sm_6_3_versionsm_6_3sm_6_4_versionsm_6_4sm_6_5_versionsm_6_5sm_6_6_versionsm_6_6sm_6_7_versionsm_6_7sm_6_8_versionsm_6_8sm_6_9_versionsm_6_9sm_6_10_versionsm_6_10DX_4_0DX_4_1DX_5_0DX_5_1DX_6_0DX_6_1DX_6_2DX_6_3DX_6_4DX_6_5DX_6_6DX_6_7DX_6_8DX_6_9DX_6_10GLSL_130: enables the GLSL_130 extensionGLSL_140: enables the GLSL_140 extensionGLSL_150: enables the GLSL_150 extensionGLSL_330: enables the GLSL_330 extensionGLSL_400: enables the GLSL_400 extensionGLSL_410: enables the GLSL_410 extensionGLSL_420: enables the GLSL_420 extensionGLSL_430: enables the GLSL_430 extensionGLSL_440: enables the GLSL_440 extensionGLSL_450: enables the GLSL_450 extensionGLSL_460: enables the GLSL_460 extensionGLSL_410_SPIRV_1_0: enables the GLSL_410_SPIRV_1_0 extensionGLSL_420_SPIRV_1_0: enables the GLSL_420_SPIRV_1_0 extensionGLSL_430_SPIRV_1_0: enables the GLSL_430_SPIRV_1_0 extensioncuda_sm_1_0cuda_sm_2_0cuda_sm_3_0cuda_sm_3_5cuda_sm_4_0cuda_sm_5_0cuda_sm_6_0cuda_sm_7_0cuda_sm_8_0cuda_sm_9_0atomic_reduceatomic_bfloat16METAL_2_3METAL_2_4METAL_3_0METAL_3_1METAL_4_0appendstructuredbufferatomic_hlslatomic_hlsl_nvapiatomic_hlsl_sm_6_6byteaddressbufferbyteaddressbuffer_rwconsumestructuredbufferstructuredbufferstructuredbuffer_rwimplicit_derivatives_samplingfragmentprocessingfragmentprocessing_derivativecontrolgetattributeatvertexmemorybarriertexture_sm_4_0texture_sm_4_1texture_sm_4_1_samplerlesstexture_sm_4_1_compute_fragmenttexture_sm_4_0_fragmenttexture_sm_4_1_clamp_fragmenttexture_sm_4_1_vertex_fragment_geometrytexture_gatherimage_samplesimage_sizetexture_sizetexture_querylodtexture_querylevelstexture_shadowlodtexture_shadowgradatomic_glsl_float1atomic_glsl_float2atomic_glsl_halfvecatomic_glslatomic_glsl_int64GLSL_430_SPIRV_1_0_compute: enables the GLSL_430_SPIRV_1_0_compute extensionimage_loadstorenonuniformqualifierprintftexturefootprinttexturefootprintclampshader5_sm_4_0shader5_sm_5_0pack_vectorsubgroup_basicsubgroup_ballotsubgroup_ballot_activemasksubgroup_basic_ballotsubgroup_voteshaderinvocationgroupsubgroup_arithmeticsubgroup_shufflesubgroup_shufflerelativesubgroup_clusteredsubgroup_quadsubgroup_partitionedsubgroup_rotateatomic_glsl_hlsl_nvapi_cuda_metal_float1atomic_glsl_hlsl_nvapi_cuda5_int64atomic_glsl_hlsl_nvapi_cuda6_int64atomic_glsl_hlsl_nvapi_cuda9_int64atomic_glsl_hlsl_cuda_metalatomic_glsl_hlsl_cuda9_int64helper_lanequad_controlbreakpointraytracing_allstagesraytracing_anyhitraytracing_intersectionraytracing_anyhit_closesthitraytracing_lssraytracing_lss_horaytracing_anyhit_closesthit_intersectionraytracing_object_space_rayraytracing_raygen_closesthit_missraytracing_anyhit_closesthit_intersection_missraytracing_raygen_closesthit_miss_callableraytracing_positionraytracing_motionblur_anyhit_closesthit_intersection_missraytracing_motionblur_raygen_closesthit_missrayquery_positionser_raygenser_raygen_closesthit_missser_nv_raygenser_nv_raygen_closesthit_missser_nv_motion_raygen_closesthit_missser_any_closesthit_intersection_missser_anyhit_closesthit_intersectionser_anyhit_closesthitser_motion_raygen_closesthit_missser_motion_raygenser_dxr_raygen_closesthit_missser_dxr_raygenall
A <language>, <format>, and/or <stage> may be inferred from the extension of an input or -o path
hlsl,fx: hlsldxbcdxbc-asm: dxbc-assemblydxildxil-asm: dxil-assemblyglslvert: glsl (vertex)frag: glsl (fragment)geom: glsl (geoemtry)tesc: glsl (hull)tese: glsl (domain)comp: glsl (compute)mesh: glsl (mesh)task: glsl (amplification)slangspv: SPIR-Vspv-asm: SPIR-V assemblyccpp,c++,cxx: C++hpp: C++ Headerexe: executabledll,so: sharedlibrary/dllcu: CUDAcuh: CUDA Headerptx: PTXobj,o: object-codezip: containerslang-module,slang-library: Slang Module/Librarydir: Container as a directory
Available help categories for the -h option
General: General optionsTarget: Target code generation optionsDownstream: Downstream compiler optionsDebugging: Compiler debugging/instrumentation optionsRepro: Slang repro system relatedExperimental: Experimental options (use at your own risk)Internal: Internal-use options (use at your own risk)Deprecated: Deprecated options (allowed but ignored; may be removed in future)compiler: Downstream Compilers (aka Pass through)language: Languagelanguage-version: Language Versionarchive-type: Archive Typeline-directive-mode: Line Directive Modedebug-info-format: Debug Info Formatfp-mode: Floating Point Modefp-denormal-mode: Floating Point Denormal Handling Modehelp-style: Help Styleoptimization-level: Optimization Leveldebug-level: Debug Levelfile-system-type: File System Typesource-embed-style: Source Embed Styletarget: Targetstage: Stagevulkan-shift: Vulkan Shiftcapability: A capability describes an optional feature that a target may or may not support. When a -capability is specified, the compiler may assume that the target supports that capability, and generate code accordingly.file-extension: A <language>, <format>, and/or <stage> may be inferred from the extension of an input or -o pathhelp-category: Available help categories for the -h option