Skip to content

Latest commit

 

History

History
1349 lines (951 loc) · 76.8 KB

command-line-slangc-reference.md

File metadata and controls

1349 lines (951 loc) · 76.8 KB

Slang Command Line Options

Usage:

slangc [options...] [--] <input files>

# For help
slangc -h

# To generate this file
slangc -help-style markdown -h

Quick Links

General

General options

-D

-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

-depfile <path>

Save the source file dependency list in a file.

-entry

-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

-specialize <typename>

Specialize the last entrypoint with <typename>.

-emit-ir

Emit IR typically as a '.slang-module' when outputting to a container.

-h, -help, --help

-h or -h <help-category>

Print this message, or help in specified category.

-help-style

-help-style <help-style>

Help formatting style

-I

-I<path>, -I <path>

Add a path to be used in resolving '#include' and 'import' operations.

-lang

-lang <language>

Set the language for the following input files.

-matrix-layout-column-major

Set the default matrix layout to column-major.

-matrix-layout-row-major

Set the default matrix layout to row-major.

-ignore-capabilities

Do not warn or error if capabilities are violated

-module-name

-module-name <name>

Set the module name to use when compiling multiple .slang source files into a single module.

-o

-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>.

id="reflection-json"

-reflection-json

-reflection-json <path>

Specify a path where program reflection data should be written in JSON format.

-profile

-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}

  • 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 <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 <target>

Specifies the format in which code should be generated.

-v, -version

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'.

-warnings-as-errors

-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

-warnings-disable <id>[,<id>...]

Disable specific warning ids.

-W

-W<id>

Enable a warning with the specified id.

-Wno-

-Wno-<id>

Disable warning with <id>

-dump-warning-diagnostics

Dump to output list of warning diagnostic numeric and name ids.

--

Treat the rest of the command line as input files.

-report-downstream-time

Reports the time spent in the downstream compiler.

-report-perf-benchmark

Reports compiler performance benchmark results.

-skip-spirv-validation

Skips spirv validation.

-source-embed-style

-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

-source-embed-name <name>

The name used as the basis for variables output for source embedding.

-source-embed-language

-source-embed-language <language>

The language to be used for source embedding. Defaults to C/C++. Currently only C/C++ are supported

-disable-short-circuit

Disable short-circuiting for "&&" and "||" operations

Target

Target code generation options

-capability

-capability <capability>[+<capability>...]

Add optional capabilities to a code generation target. See Capabilities below.

-default-image-format-unknown

Set the format of R/W images with unspecified format to 'unknown'. Otherwise try to guess the format.

-disable-dynamic-dispatch

Disables generating dynamic dispatch code.

-disable-specialization

Disables generics and specialization pass.

-fp-mode, -floating-point-mode

-fp-mode <fp-mode>, -floating-point-mode <fp-mode>

Control floating point optimizations

-g

-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 <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.

-O

-O<optimization-level>

Set the optimization level.

-obfuscate

Remove all source file information from outputs.

-force-glsl-scalar-layout, -fvk-use-scalar-layout

Make data accessed through ConstantBuffer, ParameterBlock, StructuredBuffer, ByteAddressBuffer and general pointers follow the 'scalar' layout when targeting GLSL or SPIRV.

-fvk-b-shift, -fvk-s-shift, -fvk-t-shift, -fvk-u-shift

-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>.

-fvk-bind-globals

-fvk-bind-globals <N> <descriptor-set>

Places the $Globals cbuffer at descriptor set <descriptor-set> and binding <N>.

-fvk-invert-y

Negates (additively inverts) SV_Position.y before writing to stage output.

-fvk-use-dx-position-w

Reciprocates (multiplicatively inverts) SV_Position.w after reading from stage input. For use in fragment shaders only.

-fvk-use-entrypoint-name

Uses the entrypoint name from the source instead of 'main' in the spirv output.

-fvk-use-gl-layout

Use std430 layout instead of D3D buffer layout for raw buffer load/stores.

-fvk-use-dx-layout

Use FXC buffer packing rules with SPIRV targets. GLSL is not suported. Slang's ParameterBlock will follow ConstantBuffer packing rules.

-fspv-reflect

Include reflection decorations in the resulting SPIRV for shader parameters.

-enable-effect-annotations

Enables support for legacy effect annotation syntax.

-emit-spirv-via-glsl

Generate SPIR-V output by compiling generated GLSL with glslang

-emit-spirv-directly

Generate SPIR-V output direclty (default)

-spirv-core-grammar

A path to a specific spirv.core.grammar.json to use when generating SPIR-V output

-incomplete-library

Allow generating code from incomplete libraries with unresolved external functions

Downstream

Downstream compiler options

-none-path, -fxc-path, -dxc-path, -glslang-path, -spirv-dis-path, -clang-path, -visualstudio-path, -gcc-path,

-genericcpp-path, -nvrtc-path, -llvm-path, -spirv-opt-path, -metal-path

-<compiler>-path <path>

Specify path to a downstream <compiler> executable or library.

-default-downstream-compiler

-default-downstream-compiler <language> <compiler>

Set a default compiler for the given language. See -lang for the list of languages.

-X

-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

-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

Debugging

Compiler debugging/instrumentation options

-dump-ast

Dump the AST to a .slang-ast file next to the input.

-dump-intermediate-prefix

-dump-intermediate-prefix <prefix>

File name prefix for -dump-intermediates outputs, default is 'slang-dump-'

-dump-intermediates

Dump intermediate outputs for debugging.

-dump-ir

Dump the IR for debugging.

-dump-ir-ids

Dump the IDs with -dump-ir (debug builds only)

-E, -output-preprocessor

Output the preprocessing result and exit.

-no-codegen

Skip the code generation step, just check the code and generate layout.

-output-includes

Print the hierarchy of the processed source files.

-serial-ir

Serialize the IR between front-end and back-end.

-skip-codegen

Skip the code generation phase.

-validate-ir

Validate the IR between the phases.

-verbose-paths

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-debug-serial-ir

Verify IR in the front-end.

Repro

Slang repro system related

-dump-repro-on-error

Dump .slang-repro file on any compilation error.

-extract-repro

-extract-repro <name>

Extract the repro files into a folder.

-load-repro-directory

-load-repro-directory <path>

Use repro along specified path

-load-repro

-load-repro <name>

Load repro

-repro-file-system

-repro-file-system <name>

Use a repro as a file system

-dump-repro

Dump a .slang-repro file that can be used to reproduce a compilation on another machine.

-repro-fallback-directory

**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

Experimental options (use at your own risk)

-file-system

-file-system <file-system-type>

Set the filesystem hook to use for a compile request.

-heterogeneous

Output heterogeneity-related code.

-no-mangle

Do as little mangling of names as possible.

-no-hlsl-binding

Do not include explicit parameter binding semantics in the output HLSL code,except for parameters that has explicit bindings in the input source.

-no-hlsl-pack-constant-buffer-elements

Do not pack elements of constant buffers into structs in the output HLSL code.

-validate-uniformity

Perform uniformity validation analysis.

-allow-glsl

Enable GLSL as an input language.

Internal

Internal-use options (use at your own risk)

-archive-type

-archive-type <archive-type>

Set the archive type for -save-stdlib. Default is zip.

-compile-stdlib

Compile the StdLib from embedded sources. Will return a failure if there is already a StdLib available.

-doc

Write documentation for -compile-stdlib

-ir-compression

-ir-compression <type>

Set compression for IR and AST outputs.

Accepted compression types: none, lite

-load-stdlib

-load-stdlib <filename>

Load the StdLib from file.

-r

-r <name>

reference module <name>

-save-stdlib

-save-stdlib <filename>

Save the StdLib modules to an archive file.

-save-stdlib-bin-source

-save-stdlib-bin-source <filename>

Same as -save-stdlib but output the data as a C array.

-track-liveness

Enable liveness tracking. Places SLANG_LIVE_START, and SLANG_LIVE_END in output source to indicate value liveness.

Deprecated

Deprecated options (allowed but ignored; may be removed in future)

-parameter-blocks-use-register-spaces

Parameter blocks will use register spaces

compiler

Downstream Compilers (aka Pass through)

  • none : Unknown
  • fxc : FXC HLSL compiler
  • dxc : DXC HLSL compiler
  • glslang : GLSLANG GLSL compiler
  • spirv-dis : spirv-tools SPIRV disassembler
  • clang : Clang C/C++ compiler
  • visualstudio, vs : Visual Studio C/C++ compiler
  • gcc : GCC C/C++ compiler
  • genericcpp, c, cpp : A generic C++ compiler (can be any one of visual studio, clang or gcc depending on system and availability)
  • nvrtc : NVRTC CUDA compiler
  • llvm : LLVM/Clang slang-llvm
  • spirv-opt : spirv-tools SPIRV optimizer
  • metal : Metal shader compiler

language

Language

  • c, C : C language
  • cpp, c++, C++, cxx : C++ language
  • slang : Slang language
  • glsl : GLSL language
  • hlsl : HLSL language
  • cu, cuda : CUDA

archive-type

Archive Type

  • riff-deflate : Slang RIFF using deflate compression
  • riff-lz4 : Slang RIFF using LZ4 compression
  • zip : Zip file
  • riff : Slang RIFF without compression

line-directive-mode

Line Directive Mode

  • none : Don't emit #line directives at all
  • source-map : Use source map to track line associations (doen't emit #line)
  • default : Default behavior
  • standard : Emit standard C-style #line directives.
  • glsl : Emit GLSL-style directives with file number instead of name.

debug-info-format

Debug Info Format

  • default-format : Use the default debugging format for the target
  • c7 : CodeView C7 format (typically means debugging infomation is embedded in the binary)
  • pdb : Program database
  • stabs : STABS debug format
  • coff : COFF debug format
  • dwarf : DWARF debug format

fp-mode

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

help-style

Help Style

  • text : Text suitable for output to a terminal
  • markdown : Markdown
  • no-link-markdown : Markdown without links

optimization-level

Optimization Level

  • 0, none : Disable all optimizations
  • 1, 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

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

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

Source Embed Style

  • none : No source level embedding
  • default : The default embedding for the type to be embedded
  • text : 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

Target

  • unknown
  • none
  • hlsl : HLSL source code
  • dxbc : DirectX shader bytecode binary
  • dxbc-asm, dxbc-assembly : DirectX shader bytecode assembly
  • dxil : DirectX Intermediate Language binary
  • dxil-asm, dxil-assembly : DirectX Intermediate Language assembly
  • glsl : GLSL source code
  • glsl-vulkan : GLSL Vulkan source code
  • glsl-vulkan-one-desc : GLSL Vulkan source code
  • spirv : SPIR-V binary
  • spirv-asm, spirv-assembly : SPIR-V assembly
  • c : C source code
  • cpp, c++, cxx : C++ source code
  • torch, torch-binding, torch-cpp, torch-cpp-binding : C++ for pytorch binding
  • host-cpp, host-c++, host-cxx : C++ source for host execution
  • exe, executable : Executable binary
  • shader-sharedlib, shader-sharedlibrary, shader-dll : Shared library/Dll for shader kernel
  • sharedlib, sharedlibrary, dll : Shared library/Dll for host execution
  • cuda, cu : CUDA source code
  • ptx : PTX assembly
  • cuobj, cubin : CUDA binary
  • host-callable, callable : Host callable
  • object-code : Object code
  • host-host-callable : Host callable for host execution
  • metal : Metal shader source
  • metallib : Metal Library Bytecode
  • Metal Library Bytecode assembly

stage

Stage

  • vertex
  • hull
  • domain
  • geometry
  • pixel, fragment
  • compute
  • raygeneration
  • intersection
  • anyhit
  • closesthit
  • miss
  • callable
  • mesh
  • amplification

vulkan-shift

Vulkan Shift

  • b : Constant buffer view
  • s : Sampler
  • t : Shader resource view
  • u : Unorderd access view

capability

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 version
  • Invalid
  • textualTarget
  • hlsl
  • glsl
  • c
  • cpp
  • cuda
  • metal
  • glsl_spirv_1_0
  • glsl_spirv_1_1
  • glsl_spirv_1_2
  • glsl_spirv_1_3
  • glsl_spirv_1_4
  • glsl_spirv_1_5
  • glsl_spirv_1_6
  • metallib_2_3
  • metallib_2_4
  • vertex
  • fragment
  • compute
  • hull
  • domain
  • geometry
  • raygen
  • intersection
  • anyhit
  • closesthit
  • miss
  • mesh
  • amplification
  • callable
  • hlsl_nvapi
  • SOURCE_EXT_GL_NV_compute_shader_derivatives
  • SPV_EXT_fragment_shader_interlock : enables the SPV_EXT_fragment_shader_interlock extension
  • SPV_KHR_fragment_shader_barycentric : enables the SPV_KHR_fragment_shader_barycentric extension
  • SPV_EXT_fragment_fully_covered : enables the SPV_EXT_fragment_fully_covered extension
  • SPV_EXT_descriptor_indexing : enables the SPV_EXT_descriptor_indexing extension
  • SPV_EXT_shader_atomic_float_add : enables the SPV_EXT_shader_atomic_float_add extension
  • SPV_EXT_shader_atomic_float16_add : enables the SPV_EXT_shader_atomic_float16_add extension
  • SPV_EXT_shader_atomic_float_min_max : enables the SPV_EXT_shader_atomic_float_min_max extension
  • SPV_KHR_non_semantic_info : enables the SPV_KHR_non_semantic_info extension
  • SPV_NV_shader_subgroup_partitioned : enables the SPV_NV_shader_subgroup_partitioned extension
  • SPV_NV_ray_tracing_motion_blur : enables the SPV_NV_ray_tracing_motion_blur extension
  • SPV_EXT_mesh_shader : enables the SPV_EXT_mesh_shader extension
  • SPV_KHR_ray_tracing : enables the SPV_KHR_ray_tracing extension
  • SPV_KHR_ray_query : enables the SPV_KHR_ray_query extension
  • SPV_KHR_ray_tracing_position_fetch : enables the SPV_KHR_ray_tracing_position_fetch extension
  • SPV_NV_shader_invocation_reorder : enables the SPV_NV_shader_invocation_reorder extension
  • SPV_KHR_shader_clock : enables the SPV_KHR_shader_clock extension
  • SPV_NV_shader_image_footprint : enables the SPV_NV_shader_image_footprint extension
  • SPV_GOOGLE_user_type : enables the SPV_GOOGLE_user_type extension
  • SPV_NV_compute_shader_derivatives : enables the SPV_NV_compute_shader_derivatives extension
  • spvAtomicFloat32AddEXT
  • spvAtomicFloat16AddEXT
  • spvInt64Atomics
  • spvAtomicFloat32MinMaxEXT
  • spvAtomicFloat16MinMaxEXT
  • spvDerivativeControl
  • spvImageQuery
  • spvImageGatherExtended
  • spvImageFootprintNV
  • spvMinLod
  • spvFragmentShaderPixelInterlockEXT
  • spvFragmentBarycentricKHR
  • spvFragmentFullyCoveredEXT
  • spvGroupNonUniformBallot
  • spvGroupNonUniformShuffle
  • spvGroupNonUniformArithmetic
  • spvGroupNonUniformQuad
  • spvGroupNonUniformVote
  • spvGroupNonUniformPartitionedNV
  • spvRayTracingMotionBlurNV
  • spvMeshShadingEXT
  • spvRayTracingKHR
  • spvRayTracingPositionFetchKHR
  • spvRayQueryKHR
  • spvRayQueryPositionFetchKHR
  • spvShaderInvocationReorderNV
  • spvShaderClockKHR
  • spvShaderNonUniform
  • spirv
  • spirv_latest
  • any_target
  • any_textual_target
  • any_gfx_target
  • any_cpp_target
  • cpp_cuda
  • cpp_cuda_glsl_spirv
  • cpp_cuda_glsl_hlsl
  • cpp_cuda_glsl_hlsl_spirv
  • cpp_cuda_glsl_hlsl_metal_spirv
  • cpp_cuda_hlsl
  • cpp_glsl
  • cpp_glsl_hlsl_spirv
  • cpp_hlsl
  • cuda_glsl_hlsl
  • cuda_glsl_hlsl_spirv
  • cuda_glsl_spirv
  • cuda_hlsl
  • cuda_hlsl_spirv
  • glsl_hlsl_spirv
  • glsl_spirv
  • hlsl_spirv
  • pixel
  • raygeneration
  • tesscontrol
  • tesseval
  • amplification_mesh
  • raytracing_stages
  • intersection
  • raygen
  • anyhit_closesthit
  • raygen_closesthit_miss
  • anyhit_closesthit_intersection
  • anyhit_closesthit_intersection_miss
  • raygen_closesthit_miss_callable
  • compute_tesscontrol_tesseval
  • compute_fragment
  • compute_fragment_geometry_vertex
  • domain_hull
  • raytracingstages_fragment
  • raytracingstages_compute
  • raytracingstages_compute_amplification_mesh
  • raytracingstages_compute_fragment
  • raytracingstages_compute_fragment_geometry_vertex
  • GL_ARB_derivative_control : enables the GL_ARB_derivative_control extension
  • GL_ARB_fragment_shader_interlock : enables the GL_ARB_fragment_shader_interlock extension
  • GL_ARB_gpu_shader5 : enables the GL_ARB_gpu_shader5 extension
  • GL_ARB_sparse_texture_clamp : enables the GL_ARB_sparse_texture_clamp extension
  • GL_EXT_texture_query_lod : enables the GL_EXT_texture_query_lod extension
  • GL_ARB_texture_query_levels : enables the GL_ARB_texture_query_levels extension
  • GL_ARB_texture_cube_map : enables the GL_ARB_texture_cube_map extension
  • GL_ARB_texture_gather : enables the GL_ARB_texture_gather extension
  • GL_EXT_buffer_reference : enables the GL_EXT_buffer_reference extension
  • GL_EXT_buffer_reference_uvec2 : enables the GL_EXT_buffer_reference_uvec2 extension
  • GL_EXT_debug_printf : enables the GL_EXT_debug_printf extension
  • GL_EXT_fragment_shader_barycentric : enables the GL_EXT_fragment_shader_barycentric extension
  • GL_EXT_mesh_shader : enables the GL_EXT_mesh_shader extension
  • GL_EXT_nonuniform_qualifier : enables the GL_EXT_nonuniform_qualifier extension
  • GL_EXT_ray_query : enables the GL_EXT_ray_query extension
  • GL_EXT_ray_tracing : enables the GL_EXT_ray_tracing extension
  • GL_EXT_ray_tracing_position_fetch : enables the GL_EXT_ray_tracing_position_fetch extension
  • GL_EXT_samplerless_texture_functions : enables the GL_EXT_samplerless_texture_functions extension
  • GL_EXT_shader_atomic_float : enables the GL_EXT_shader_atomic_float extension
  • GL_EXT_shader_atomic_float2 : enables the GL_EXT_shader_atomic_float2 extension
  • GL_EXT_shader_atomic_int64 : enables the GL_EXT_shader_atomic_int64 extension
  • GL_EXT_shader_atomic_float_min_max : enables the GL_EXT_shader_atomic_float_min_max extension
  • GL_EXT_shader_explicit_arithmetic_types_int64 : enables the GL_EXT_shader_explicit_arithmetic_types_int64 extension
  • GL_EXT_shader_image_load_store : enables the GL_EXT_shader_image_load_store extension
  • GL_EXT_shader_realtime_clock : enables the GL_EXT_shader_realtime_clock extension
  • GL_EXT_texture_shadow_lod : enables the GL_EXT_texture_shadow_lod extension
  • GL_KHR_memory_scope_semantics : enables the GL_KHR_memory_scope_semantics extension
  • GL_KHR_shader_subgroup_arithmetic : enables the GL_KHR_shader_subgroup_arithmetic extension
  • GL_KHR_shader_subgroup_basic : enables the GL_KHR_shader_subgroup_basic extension
  • GL_KHR_shader_subgroup_ballot : enables the GL_KHR_shader_subgroup_ballot extension
  • GL_KHR_shader_subgroup_clustered : enables the GL_KHR_shader_subgroup_clustered extension
  • GL_KHR_shader_subgroup_shuffle : enables the GL_KHR_shader_subgroup_shuffle extension
  • GL_KHR_shader_subgroup_shuffle_relative : enables the GL_KHR_shader_subgroup_shuffle_relative extension
  • GL_KHR_shader_subgroup_vote : enables the GL_KHR_shader_subgroup_vote extension
  • GL_KHR_shader_subgroup_quad : enables the GL_KHR_shader_subgroup_quad extension
  • GL_NV_compute_shader_derivatives : enables the GL_NV_compute_shader_derivatives extension
  • GL_ARB_shader_image_size : enables the GL_ARB_shader_image_size extension
  • GL_ARB_shader_texture_image_samples : enables the GL_ARB_shader_texture_image_samples extension
  • GL_NV_shader_atomic_fp16_vector : enables the GL_NV_shader_atomic_fp16_vector extension
  • GL_NV_shader_subgroup_partitioned : enables the GL_NV_shader_subgroup_partitioned extension
  • GL_NV_ray_tracing_motion_blur : enables the GL_NV_ray_tracing_motion_blur extension
  • GL_NV_shader_invocation_reorder : enables the GL_NV_shader_invocation_reorder extension
  • GL_NV_shader_texture_footprint : enables the GL_NV_shader_texture_footprint extension
  • GL_NV_fragment_shader_barycentric : enables the GL_NV_fragment_shader_barycentric extension
  • GL_NV_ray_tracing : enables the GL_NV_ray_tracing extension
  • nvapi
  • raytracing
  • ser
  • motionblur
  • rayquery
  • raytracing_motionblur
  • ser_motion
  • shaderclock
  • _meshshading
  • meshshading
  • fragmentshaderinterlock
  • atomic64
  • atomicfloat
  • atomicfloat2
  • groupnonuniform
  • fragmentshaderbarycentric
  • shadermemorycontrol
  • shadermemorycontrol_compute
  • subpass
  • subgroup_basic
  • subgroup_basic_ballot
  • subgroup_vote
  • subgroup_arithmetic
  • subgroup_ballot
  • subgroup_shuffle
  • subgroup_shufflerelative
  • subgroup_clustered
  • subgroup_quad
  • subgroup_partitioned
  • shaderinvocationgroup
  • waveprefix
  • bufferreference
  • bufferreference_int64
  • sm_4_0
  • sm_4_1
  • sm_5_0
  • sm_5_1
  • sm_6_0
  • sm_6_1
  • sm_6_2
  • sm_6_3
  • sm_6_4
  • sm_6_5
  • sm_6_6
  • sm_6_7
  • GLSL_130 : enables the GLSL_130 extension
  • GLSL_140 : enables the GLSL_140 extension
  • GLSL_150 : enables the GLSL_150 extension
  • GLSL_330 : enables the GLSL_330 extension
  • GLSL_400 : enables the GLSL_400 extension
  • GLSL_410 : enables the GLSL_410 extension
  • GLSL_420 : enables the GLSL_420 extension
  • GLSL_430 : enables the GLSL_430 extension
  • GLSL_440 : enables the GLSL_440 extension
  • GLSL_450 : enables the GLSL_450 extension
  • GLSL_460 : enables the GLSL_460 extension
  • GLSL_410_SPIRV_1_0 : enables the GLSL_410_SPIRV_1_0 extension
  • GLSL_420_SPIRV_1_0 : enables the GLSL_420_SPIRV_1_0 extension
  • GLSL_430_SPIRV_1_0 : enables the GLSL_430_SPIRV_1_0 extension
  • DX_4_0
  • DX_4_1
  • DX_5_0
  • DX_5_1
  • DX_6_0
  • DX_6_1
  • DX_6_2
  • DX_6_3
  • DX_6_4
  • DX_6_5
  • DX_6_6
  • DX_6_7
  • METAL_2_3
  • METAL_2_4
  • sm_4_0_version
  • appendstructuredbuffer
  • atomic_hlsl
  • atomic_hlsl_nvapi
  • atomic_hlsl_sm_6_6
  • byteaddressbuffer
  • byteaddressbuffer_rw
  • consumestructuredbuffer
  • fragmentprocessing
  • fragmentprocessing_derivativecontrol
  • getattributeatvertex
  • memorybarrier
  • structuredbuffer
  • structuredbuffer_rw
  • texture_sm_4_1
  • texture_sm_4_1_samplerless
  • texture_sm_4_1_compute_fragment
  • texture_sm_4_0_fragment
  • texture_sm_4_1_clamp_fragment
  • texture_sm_4_1_vertex_fragment_geometry
  • texture_gather
  • image_samples
  • image_size
  • texture_size
  • texture_querylod
  • texture_querylevels
  • texture_shadowlod
  • texture_shadowlod_cube
  • texture_cube
  • texture_querylevels_cube
  • atomic_glsl_float1
  • atomic_glsl_float2
  • atomic_glsl_halfvec
  • atomic_glsl
  • atomic_glsl_int64
  • GLSL_430_SPIRV_1_0_compute : enables the GLSL_430_SPIRV_1_0_compute extension
  • image_loadstore
  • nonuniformqualifier
  • printf
  • texturefootprint
  • texturefootprintclamp
  • shader5_sm_4_0
  • shader5_sm_5_0
  • atomic_glsl_hlsl_cuda
  • atomic_glsl_hlsl_nvapi_cuda_float1
  • atomic_glsl_hlsl_cuda_float2
  • atomic_glsl_hlsl_cuda2_int64
  • atomic_glsl_hlsl_nvapi_cuda5_int64
  • atomic_glsl_hlsl_nvapi_cuda6_int64
  • atomic_glsl_hlsl_cuda9_int64
  • breakpoint
  • rayobject
  • raytracing_allstages
  • raytracing_anyhit
  • raytracing_intersection
  • raytracing_anyhit_closesthit
  • raytracing_anyhit_closesthit_intersection
  • raytracing_raygen_closesthit_miss
  • raytracing_anyhit_closesthit_intersection_miss
  • raytracing_raygen_closesthit_miss_callable
  • raytracing_position
  • raytracing_motionblur_anyhit_closesthit_intersection_miss
  • raytracing_motionblur_raygen_closesthit_miss
  • rayquery_position
  • ser_raygen
  • ser_raygen_closesthit_miss
  • ser_any_closesthit_intersection_miss
  • ser_anyhit_closesthit_intersection
  • ser_anyhit_closesthit
  • ser_motion_raygen_closesthit_miss
  • ser_motion_raygen
  • all

file-extension

A <language>, <format>, and/or <stage> may be inferred from the extension of an input or -o path

  • hlsl, fx : hlsl
  • dxbc
  • dxbc-asm : dxbc-assembly
  • dxil
  • dxil-asm : dxil-assembly
  • glsl
  • vert : glsl (vertex)
  • frag : glsl (fragment)
  • geom : glsl (geoemtry)
  • tesc : glsl (hull)
  • tese : glsl (domain)
  • comp : glsl (compute)
  • slang
  • spv : SPIR-V
  • spv-asm : SPIR-V assembly
  • c
  • cpp, c++, cxx : C++
  • exe : executable
  • dll, so : sharedlibrary/dll
  • cu : CUDA
  • ptx : PTX
  • obj, o : object-code
  • zip : container
  • slang-module, slang-library : Slang Module/Library
  • dir : Container as a directory