-minimum-slang-optimization
Perform minimum code optimization in Slang to favor compilation time.
-disable-non-essential-validations
Disable non-essential IR validations such as use of uninitialized variables.
-disable-source-map
Disable source mapping in the Obfuscation.
-module-name
-module-name <name>
-preserve-params
Preserve all resource parameters in the output code, even if they are not used by the shader.
Target
Target code generation options
-track-liveness
Enable liveness tracking. Places SLANG_LIVE_START, and SLANG_LIVE_END in output source to indicate value liveness.
-loop-inversion
Enable loop inversion in the code-gen optimization. Default is off
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
metallib_3_0
metallib_3_1
hlsl_nvapi
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 -
SPV_EXT_demote_to_helper_invocation
: enables the SPV_EXT_demote_to_helper_invocation 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
spvDemoteToHelperInvocationEXT
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_cuda_hlsl_spirv
cpp_cuda_hlsl_metal_spirv
cpp_glsl
cpp_glsl_hlsl_spirv
cpp_glsl_hlsl_metal_spirv
cpp_hlsl
cuda_glsl_hlsl
cuda_glsl_hlsl_spirv
cuda_glsl_hlsl_metal_spirv
cuda_glsl_spirv
cuda_hlsl
cuda_hlsl_spirv
glsl_hlsl_spirv
glsl_hlsl_metal_spirv
glsl_metal_spirv
glsl_spirv
hlsl_spirv
metallib_latest
any_stage
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_internal
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
SPIRV_1_0
SPIRV_1_1
SPIRV_1_2
SPIRV_1_3
SPIRV_1_4
SPIRV_1_5
SPIRV_1_6
sm_2_0_GLSL_140
sm_2_0_GLSL_400
sm_4_0_version
appendstructuredbuffer
atomic_hlsl
atomic_hlsl_nvapi
atomic_hlsl_sm_6_6
byteaddressbuffer
byteaddressbuffer_rw
consumestructuredbuffer
fragmentprocessing
fragmentprocessing_derivativecontrol
getattributeatvertex
memorybarrier_compute
glsl_barrier
memorybarrier
structuredbuffer
structuredbuffer_rw
texture_sm_4_1
texture_sm_4_1_samplerless
texture_sm_4_1_compute_fragment
-
texture_sm_4_1_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
subgroup_basic
subgroup_ballot
subgroup_ballot_activemask
subgroup_basic_ballot
subgroup_vote
shaderinvocationgroup
subgroup_arithmetic
subgroup_shuffle
subgroup_shufflerelative
subgroup_clustered
subgroup_quad
subgroup_partitioned
atomic_glsl_hlsl_cuda
-
atomic_glsl_hlsl_cuda_float1
atomic_glsl_hlsl_nvapi_cuda_float1
atomic_glsl_hlsl_cuda_float2
atomic_glsl_hlsl_cuda2_int64
-
atomic_glsl_hlsl_cuda5_int64
atomic_glsl_hlsl_nvapi_cuda5_int64
-
atomic_glsl_hlsl_cuda6_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