// This file is the single source of truth for all capabilities // supported by the Slang language. // // This file will be parsed and processed by the slang-capability-generator // tool during the build process to produce slang-generated-capability-defs.h // and slang-generated-capability-defs-impl.h files that constitute the final // C++ source of the compiler. New capabilties should be added by editing // this file instead of the generated .h files. // // A capability atom represent a basic unit that characterizes a single code-gen target or // a platform-specific API/feature, e.g. _GL_EXT_ray_tracing represents the GLSL ray tracing // extension, and `glsl` represents the GLSL code gen target. // // A capability name is defined by a unique disjunction of conjunction of capability atoms. // For example, `raytracing` is a name that expands to // glsl + _GL_EXT_ray_tracing | spirv_1_4 + SPV_KHR_ray_tracing | hlsl + _sm_6_4 // which means it requires the `_GL_EXT_ray_tracing` extension when generating code for glsl, // requires SPV_KHR_ray_tracing for spirv, and requires sm_6_4 when generating hlsl. // // There are three types of capability definitions: // - `def`: this will introduce an new capability atom. If there is an inheritance clause, // the capability name will expand to all inherited atoms plus the newly introduced atom. // - `abstract`: an abstract capability does not introduce an actual atom. Primarily used to // make disjunctions using the following rules: // 1. Each type of abstract atom defines a "keyhole". `target` and `stage` are distinct "keyholes". // 2. Any atom immediately derived off of an abstract atom is a "key atom". // 3. Every conjunction may only populate each "keyhole" once, else the set is incompatible. // * If joining ('+') incompatible sets, an invalid capability is made. // * If Inclusive joining ('|') incompatible sets, a disjunction is made. // 4. ex: `hlsl + glsl` both populate the same "keyhole" of `target`, this is incompatible. // 5. ex: `hlsl + _sm_6_0` both populate same keyholes of `hlsl` and `hlsl`, this is compatible. // 6. ex: `hlsl | glsl` creates a disjunction of 2 sets: `hlsl` and `glsl`. This is due to the // 2 sets being incompatible. // 7. Having a not populated "keyhole" means your set is compatible with any "key atom" of // distinct "keyhole". // 8. ex: `vertex + glsl` works because 'vertex' has a unpopulated `target` "keyhole", and // therefore is compatible with all `target` "key atoms" // - `alias`: this defines an alias and does not introduce actual atoms. // Several capabilities represent the target formats in which we generate code. // Because we can only generate code in one format at a time, all of these are // marked as conflicting with one another along the `TargetFormat` axis. // // Note: We are only including here the source code formats we initially generate // code in and not the formats that code might be translated into "downstream." // Trying to figure out how to integrate both kinds of formats into our capability // system will be an interesting challenge (e.g., can we compile code for `hlsl+spirv` // and for `glsl+spirv` or even just for `spirv`, and how should all of those impact // overloading). // def textualTarget; abstract target; def hlsl : target + textualTarget; def glsl : target + textualTarget; def c : target + textualTarget; def cpp : target + textualTarget; def cuda : target + textualTarget; def metal : target + textualTarget; def spirv : target; // Capabilities that stand for target spirv version for GLSL backend. // These are not compilation targets. We will convert `_spirv_*`->`glsl_spirv_*` during a compile. def glsl_spirv_1_0 : glsl; def glsl_spirv_1_1 : glsl_spirv_1_0; def glsl_spirv_1_2 : glsl_spirv_1_1; def glsl_spirv_1_3 : glsl_spirv_1_2; def glsl_spirv_1_4 : glsl_spirv_1_3; def glsl_spirv_1_5 : glsl_spirv_1_4; def glsl_spirv_1_6 : glsl_spirv_1_5; // We have multiple capabilities for the various SPIR-V versions, // arranged so that they inherit from one another to represent which versions // provide a super-set of the features of earlier ones (e.g., SPIR-V 1.4 is // expressed as inheriting from SPIR-V 1.3). // def _spirv_1_0 : spirv; def _spirv_1_1 : _spirv_1_0; def _spirv_1_2 : _spirv_1_1; def _spirv_1_3 : _spirv_1_2; def _spirv_1_4 : _spirv_1_3; def _spirv_1_5 : _spirv_1_4; def _spirv_1_6 : _spirv_1_5; alias _spirv_latest = _spirv_1_6; def _GLSL_130 : glsl; def _GLSL_140 : _GLSL_130; def _GLSL_150 : _GLSL_140; def _GLSL_330 : _GLSL_150; def _GLSL_400 : _GLSL_330; def _GLSL_410 : _GLSL_400; def _GLSL_420 : _GLSL_410; def _GLSL_430 : _GLSL_420; def _GLSL_440 : _GLSL_430; def _GLSL_450 : _GLSL_440; def _GLSL_460 : _GLSL_450; // metal versions def metallib_2_3 : metal; def metallib_2_4 : metallib_2_3; def metallib_3_0 : metallib_2_4; def metallib_3_1 : metallib_3_0; alias metallib_latest = metallib_3_1; // hlsl versions def _sm_4_0 : hlsl; def _sm_4_1 : _sm_4_0; def _sm_5_0 : _sm_4_1; def _sm_5_1 : _sm_5_0; def _sm_6_0 : _sm_5_1; def _sm_6_1 : _sm_6_0; def _sm_6_2 : _sm_6_1; def _sm_6_3 : _sm_6_2; def _sm_6_4 : _sm_6_3; def _sm_6_5 : _sm_6_4; def _sm_6_6 : _sm_6_5; def _sm_6_7 : _sm_6_6; def hlsl_nvapi : hlsl; alias dxil_lib = _sm_6_3; // cuda versions def _cuda_sm_1_0 : cuda; def _cuda_sm_2_0 : _cuda_sm_1_0; def _cuda_sm_3_0 : _cuda_sm_2_0; def _cuda_sm_3_5 : _cuda_sm_3_0; def _cuda_sm_4_0 : _cuda_sm_3_5; def _cuda_sm_5_0 : _cuda_sm_4_0; def _cuda_sm_6_0 : _cuda_sm_5_0; def _cuda_sm_7_0 : _cuda_sm_6_0; def _cuda_sm_8_0 : _cuda_sm_7_0; def _cuda_sm_9_0 : _cuda_sm_8_0; alias any_target = hlsl | metal | glsl | c | cpp | cuda | spirv; alias any_textual_target = hlsl | metal | glsl | c | cpp | cuda; alias any_gfx_target = hlsl | metal | glsl | spirv; alias any_cpp_target = cpp | cuda; alias cpp_cuda = cpp | cuda; alias cpp_cuda_spirv = cpp | cuda | spirv; alias cpp_cuda_glsl_spirv = cpp | cuda | glsl | spirv; alias cpp_cuda_glsl_hlsl = cpp | cuda | glsl | hlsl; alias cpp_cuda_glsl_hlsl_spirv = cpp | cuda | glsl | hlsl | spirv; alias cpp_cuda_glsl_hlsl_metal_spirv = cpp | cuda | glsl | hlsl | metal | spirv; alias cpp_cuda_hlsl = cpp | cuda | hlsl; alias cpp_cuda_hlsl_spirv = cpp | cuda | hlsl | spirv; alias cpp_cuda_hlsl_metal_spirv = cpp | cuda | hlsl | metal | spirv; alias cpp_glsl = cpp | glsl; alias cpp_glsl_hlsl_spirv = cpp | glsl | hlsl | spirv; alias cpp_glsl_hlsl_metal_spirv = cpp | glsl | hlsl | metal | spirv; alias cpp_hlsl = cpp | hlsl; alias cuda_glsl_hlsl = cuda | glsl | hlsl; alias cuda_hlsl_metal_spirv = cuda | hlsl | metal | spirv; alias cuda_glsl_hlsl_spirv = cuda | glsl | hlsl | spirv; alias cuda_glsl_hlsl_metal_spirv = cuda | glsl | hlsl | metal | spirv; alias cuda_glsl_spirv = cuda | glsl | spirv; alias cuda_glsl_metal_spirv = cuda | glsl | metal | spirv; alias cuda_hlsl = cuda | hlsl; alias cuda_hlsl_spirv = cuda | hlsl | spirv; alias glsl_hlsl_spirv = glsl | hlsl | spirv; alias glsl_hlsl_metal_spirv = glsl | hlsl | metal | spirv; alias glsl_metal_spirv = glsl | metal | spirv; alias glsl_spirv = glsl | spirv; alias hlsl_spirv = hlsl | spirv; abstract stage; def vertex : stage; def fragment : stage; def compute : stage; def hull : stage; def domain : stage; def geometry : stage; def raygen : stage; def intersection : stage; def anyhit : stage; def closesthit: stage; def miss : stage; def mesh : stage; def amplification : stage; def callable : stage; alias any_stage = vertex | fragment | compute | hull | domain | geometry | raygen | intersection | anyhit | closesthit | miss | mesh | amplification | callable ; // shader stage alias's alias pixel = fragment; alias raygeneration = raygen; alias tesscontrol = hull; alias tesseval = domain; alias amplification_mesh = amplification | mesh; alias raytracing_stages = raygen | intersection | anyhit | closesthit | miss | callable; alias anyhit_closesthit = anyhit | closesthit; alias raygen_closesthit_miss = raygen | closesthit | miss; alias anyhit_closesthit_intersection = anyhit | closesthit | intersection; alias anyhit_closesthit_intersection_miss = anyhit | closesthit | intersection | miss; alias raygen_closesthit_miss_callable = raygen | closesthit | miss | callable; alias compute_tesscontrol_tesseval = compute | tesscontrol | tesseval; alias compute_fragment = compute | fragment; alias compute_fragment_geometry_vertex = compute | fragment | geometry | vertex; alias domain_hull = domain | hull; alias raytracingstages_fragment = raytracing_stages | fragment; alias raytracingstages_compute = raytracing_stages | compute; alias raytracingstages_compute_amplification_mesh = raytracingstages_compute | amplification_mesh; alias raytracingstages_compute_fragment = raytracing_stages | compute_fragment; alias raytracingstages_compute_fragment_geometry_vertex = raytracing_stages | compute_fragment_geometry_vertex; // SPIRV extensions. def SPV_EXT_fragment_shader_interlock : _spirv_1_0; def SPV_EXT_physical_storage_buffer : _spirv_1_3; def SPV_EXT_fragment_fully_covered : _spirv_1_0; def SPV_EXT_descriptor_indexing : _spirv_1_0; def SPV_EXT_shader_atomic_float_add : _spirv_1_0; def SPV_EXT_shader_atomic_float16_add : SPV_EXT_shader_atomic_float_add; def SPV_EXT_shader_atomic_float_min_max : _spirv_1_0; def SPV_EXT_mesh_shader : _spirv_1_4; def SPV_EXT_demote_to_helper_invocation : _spirv_1_4; def SPV_KHR_fragment_shader_barycentric : _spirv_1_0; def SPV_KHR_non_semantic_info : _spirv_1_0; def SPV_KHR_ray_tracing : _spirv_1_4; def SPV_KHR_ray_query : _spirv_1_0; def SPV_KHR_ray_tracing_position_fetch : _spirv_1_0; // requires SPV_KHR_ray_query or SPV_KHR_ray_tracing def SPV_KHR_shader_clock : _spirv_1_0; def SPV_NV_shader_subgroup_partitioned : _spirv_1_0; def SPV_NV_ray_tracing_motion_blur : _spirv_1_0; def SPV_NV_shader_invocation_reorder : _spirv_1_5 + SPV_KHR_ray_tracing; def SPV_NV_shader_image_footprint : _spirv_1_0; def SPV_NV_compute_shader_derivatives : _spirv_1_0; def SPV_GOOGLE_user_type : _spirv_1_0; // SPIRV Capabilities. def spvAtomicFloat32AddEXT : SPV_EXT_shader_atomic_float_add; def spvAtomicFloat16AddEXT : SPV_EXT_shader_atomic_float16_add; def spvInt64Atomics : _spirv_1_0; def spvAtomicFloat32MinMaxEXT : SPV_EXT_shader_atomic_float_min_max; def spvAtomicFloat16MinMaxEXT : SPV_EXT_shader_atomic_float_min_max; def spvDerivativeControl : _spirv_1_0; def spvImageQuery : _spirv_1_0; def spvImageGatherExtended : _spirv_1_0; def spvSparseResidency : _spirv_1_0; def spvImageFootprintNV : SPV_NV_shader_image_footprint; def spvMinLod : _spirv_1_0; def spvFragmentShaderPixelInterlockEXT : SPV_EXT_fragment_shader_interlock; def spvFragmentBarycentricKHR : SPV_KHR_fragment_shader_barycentric; def spvFragmentFullyCoveredEXT : SPV_EXT_fragment_fully_covered; def spvGroupNonUniformBallot : _spirv_1_3; def spvGroupNonUniformShuffle : _spirv_1_3; def spvGroupNonUniformArithmetic : _spirv_1_3; def spvGroupNonUniformQuad : _spirv_1_3; def spvGroupNonUniformVote : _spirv_1_3; def spvGroupNonUniformPartitionedNV : _spirv_1_3 + SPV_NV_shader_subgroup_partitioned; def spvRayTracingMotionBlurNV : SPV_NV_ray_tracing_motion_blur; def spvMeshShadingEXT : SPV_EXT_mesh_shader; def spvRayTracingKHR : SPV_KHR_ray_tracing; def spvRayTracingPositionFetchKHR : SPV_KHR_ray_tracing_position_fetch + spvRayTracingKHR; def spvRayQueryKHR : SPV_KHR_ray_query; def spvRayQueryPositionFetchKHR : SPV_KHR_ray_tracing_position_fetch + spvRayQueryKHR; def spvShaderInvocationReorderNV : SPV_NV_shader_invocation_reorder; def spvShaderClockKHR : SPV_KHR_shader_clock; def spvShaderNonUniformEXT : SPV_EXT_descriptor_indexing; def spvShaderNonUniform : spvShaderNonUniformEXT; def spvDemoteToHelperInvocationEXT : SPV_EXT_demote_to_helper_invocation; def spvDemoteToHelperInvocation : spvDemoteToHelperInvocationEXT; // The following capabilities all pertain to how ray tracing shaders are translated // to GLSL, where there are two different extensions that can provide the core // functionality of `TraceRay` and the related operations. // // The two extensions are expressed as distinct capabilities that both are marked // as conflicting on the `RayTracingExtension` axis, so that a compilation target // cannot have both enabled at once. // // The `_GL_EXT_ray_tracing` extension should be favored, so it has a rank of `1` // instead of `0`, which means that when comparing overloads that require these // extensions, the `EXT` extension will be favored over the `NV` extension, if // all other factors are equal. // // If a user enabled a GL_ARB/GL_NV/GL_KHR, the user will also be-able to enable any equal GL_EXT // To describe this relationship, all GL_EXT which were promoted (or originally not an EXT) // will be set as a derived atom. def _GL_EXT_buffer_reference : _GLSL_450; def _GL_EXT_buffer_reference_uvec2 : _GLSL_450; def _GL_EXT_debug_printf : glsl; def _GL_EXT_demote_to_helper_invocation : _GLSL_140; def _GL_EXT_fragment_shader_barycentric : _GLSL_450; def _GL_EXT_mesh_shader : _GLSL_450; def _GL_EXT_nonuniform_qualifier : glsl; def _GL_EXT_ray_query : _GLSL_460 + glsl_spirv_1_4; // spirv_1_4 is required due to glslang bug which enables `SPV_KHR_ray_tracing` regardless of context def _GL_EXT_ray_tracing : _GLSL_460; def _GL_EXT_ray_tracing_position_fetch : _GL_EXT_ray_query; // requires _GL_EXT_ray_tracing or _GL_EXT_ray_query def _GL_EXT_samplerless_texture_functions : _GLSL_140; def _GL_EXT_shader_atomic_float : glsl; def _GL_EXT_shader_atomic_float_min_max : glsl; def _GL_EXT_shader_atomic_float2 : glsl; def _GL_EXT_shader_atomic_int64 : glsl; def _GL_EXT_shader_explicit_arithmetic_types_int64 : _GLSL_140; def _GL_EXT_shader_image_load_store : _GLSL_130; def _GL_EXT_shader_realtime_clock : glsl; def _GL_EXT_texture_query_lod : glsl; def _GL_EXT_texture_shadow_lod : _GLSL_130; def _GL_ARB_derivative_control : _GLSL_400; def _GL_ARB_fragment_shader_interlock : _GLSL_450; def _GL_ARB_gpu_shader5 : _GLSL_150; def _GL_ARB_shader_image_load_store : _GL_EXT_shader_image_load_store; def _GL_ARB_shader_image_size : _GLSL_420; def _GL_ARB_texture_multisample : _GLSL_140; def _GL_ARB_shader_texture_image_samples : _GLSL_150; def _GL_ARB_sparse_texture : glsl; def _GL_ARB_sparse_texture2 : _GL_ARB_sparse_texture; def _GL_ARB_sparse_texture_clamp : _GL_ARB_sparse_texture2; def _GL_ARB_texture_gather : _GLSL_130; def _GL_ARB_texture_query_levels : _GLSL_130; def _GL_ARB_shader_clock : _GLSL_450; def _GL_ARB_gpu_shader_int64 : _GLSL_400; def _GL_ARB_shader_clock64 : _GL_ARB_shader_clock + _GL_ARB_gpu_shader_int64; def _GL_KHR_memory_scope_semantics : _GLSL_420; def _GL_KHR_shader_subgroup_arithmetic : _GLSL_140; def _GL_KHR_shader_subgroup_ballot : _GLSL_140; def _GL_KHR_shader_subgroup_basic : _GLSL_140; def _GL_KHR_shader_subgroup_clustered : _GLSL_140; def _GL_KHR_shader_subgroup_quad : _GLSL_140; def _GL_KHR_shader_subgroup_shuffle : _GLSL_140; def _GL_KHR_shader_subgroup_shuffle_relative : _GLSL_140; def _GL_KHR_shader_subgroup_vote : _GLSL_140; def _GL_NV_compute_shader_derivatives : _GLSL_450; def _GL_NV_fragment_shader_barycentric : _GL_EXT_fragment_shader_barycentric; def _GL_NV_gpu_shader5 : _GL_ARB_gpu_shader5; def _GL_NV_ray_tracing : _GL_EXT_ray_tracing; def _GL_NV_ray_tracing_motion_blur : _GLSL_460; def _GL_NV_shader_atomic_fp16_vector : _GL_NV_gpu_shader5; def _GL_NV_shader_invocation_reorder : _GLSL_460; def _GL_NV_shader_subgroup_partitioned : _GLSL_140; def _GL_NV_shader_texture_footprint : _GLSL_450; // GLSL extension and SPV extension associations. alias GL_EXT_buffer_reference = _GL_EXT_buffer_reference | SPV_EXT_physical_storage_buffer; alias GL_EXT_buffer_reference_uvec2 = _GL_EXT_buffer_reference_uvec2 | _spirv_1_0; alias GL_EXT_debug_printf = _GL_EXT_debug_printf | SPV_KHR_non_semantic_info; alias GL_EXT_demote_to_helper_invocation = _GL_EXT_demote_to_helper_invocation | spvDemoteToHelperInvocationEXT; alias GL_EXT_fragment_shader_barycentric = _GL_EXT_fragment_shader_barycentric | spvFragmentBarycentricKHR; alias GL_EXT_mesh_shader = _GL_EXT_mesh_shader | spvMeshShadingEXT; alias GL_EXT_nonuniform_qualifier = _GL_EXT_nonuniform_qualifier | spvShaderNonUniformEXT; alias GL_EXT_ray_query = _GL_EXT_ray_query | spvRayQueryKHR; alias GL_EXT_ray_tracing = _GL_EXT_ray_tracing | spvRayTracingKHR; alias GL_EXT_ray_tracing_position_fetch_ray_tracing = _GL_EXT_ray_tracing_position_fetch | spvRayTracingPositionFetchKHR; alias GL_EXT_ray_tracing_position_fetch_ray_query = _GL_EXT_ray_tracing_position_fetch | spvRayQueryPositionFetchKHR; alias GL_EXT_ray_tracing_position_fetch = GL_EXT_ray_tracing_position_fetch_ray_tracing + GL_EXT_ray_tracing_position_fetch_ray_query; alias GL_EXT_samplerless_texture_functions = _GL_EXT_samplerless_texture_functions | _spirv_1_0; alias GL_EXT_shader_atomic_float = _GL_EXT_shader_atomic_float | spvAtomicFloat32AddEXT + spvAtomicFloat32MinMaxEXT; alias GL_EXT_shader_atomic_float_min_max = _GL_EXT_shader_atomic_float_min_max | spvAtomicFloat32MinMaxEXT + spvAtomicFloat16MinMaxEXT; alias GL_EXT_shader_atomic_float2 = _GL_EXT_shader_atomic_float2 | spvAtomicFloat32AddEXT + spvAtomicFloat32MinMaxEXT + spvAtomicFloat16AddEXT + spvAtomicFloat16MinMaxEXT; alias GL_EXT_shader_atomic_int64 = _GL_EXT_shader_atomic_int64 | spvInt64Atomics; alias GL_EXT_shader_explicit_arithmetic_types_int64 = _GL_EXT_shader_explicit_arithmetic_types_int64 | _spirv_1_0; alias GL_EXT_shader_image_load_store = _GL_EXT_shader_image_load_store | _spirv_1_0; alias GL_EXT_shader_realtime_clock = _GL_EXT_shader_realtime_clock | spvShaderClockKHR; alias GL_EXT_texture_query_lod = _GL_EXT_texture_query_lod | spvImageQuery | metal; alias GL_EXT_texture_shadow_lod = _GL_EXT_texture_shadow_lod | _spirv_1_0; alias GL_ARB_derivative_control = _GL_ARB_derivative_control | spvDerivativeControl; alias GL_ARB_fragment_shader_interlock = _GL_ARB_fragment_shader_interlock | spvFragmentShaderPixelInterlockEXT; alias GL_ARB_gpu_shader5 = _GL_ARB_gpu_shader5 | _spirv_1_0; alias GL_ARB_shader_image_load_store = GL_EXT_shader_image_load_store; alias GL_ARB_shader_image_size = _GL_ARB_shader_image_size | spvImageQuery | metal; alias GL_ARB_texture_multisample = _GL_ARB_texture_multisample | _spirv_1_0; alias GL_ARB_shader_texture_image_samples = _GL_ARB_shader_texture_image_samples | spvImageQuery | metal; alias GL_ARB_sparse_texture = _GL_ARB_sparse_texture | spvSparseResidency; alias GL_ARB_sparse_texture2 = _GL_ARB_sparse_texture2 | spvSparseResidency; alias GL_ARB_sparse_texture_clamp = _GL_ARB_sparse_texture_clamp | spvSparseResidency; alias GL_ARB_texture_gather = _GL_ARB_texture_gather | spvImageGatherExtended | metal; alias GL_ARB_texture_query_levels = _GL_ARB_texture_query_levels | spvImageQuery | metal; alias GL_ARB_shader_clock = _GL_ARB_shader_clock | spvShaderClockKHR; alias GL_ARB_shader_clock64 = _GL_ARB_shader_clock64 | spvShaderClockKHR; alias GL_ARB_gpu_shader_int64 = _GL_ARB_gpu_shader_int64; alias GL_KHR_memory_scope_semantics = _GL_KHR_memory_scope_semantics | _spirv_1_0; alias GL_KHR_shader_subgroup_arithmetic = _GL_KHR_shader_subgroup_arithmetic | spvGroupNonUniformArithmetic; alias GL_KHR_shader_subgroup_ballot = _GL_KHR_shader_subgroup_ballot | spvGroupNonUniformBallot; alias GL_KHR_shader_subgroup_basic = _GL_KHR_shader_subgroup_basic | spvGroupNonUniformBallot; alias GL_KHR_shader_subgroup_clustered = _GL_KHR_shader_subgroup_clustered | spvGroupNonUniformShuffle; alias GL_KHR_shader_subgroup_quad = _GL_KHR_shader_subgroup_quad | spvGroupNonUniformQuad; alias GL_KHR_shader_subgroup_shuffle = _GL_KHR_shader_subgroup_shuffle | spvGroupNonUniformShuffle; alias GL_KHR_shader_subgroup_shuffle_relative = _GL_KHR_shader_subgroup_shuffle_relative | spvGroupNonUniformShuffle; alias GL_KHR_shader_subgroup_vote = _GL_KHR_shader_subgroup_vote | spvGroupNonUniformVote; alias GL_NV_compute_shader_derivatives = _GL_NV_compute_shader_derivatives | SPV_NV_compute_shader_derivatives | _sm_6_6; alias GL_NV_fragment_shader_barycentric = GL_EXT_fragment_shader_barycentric; alias GL_NV_gpu_shader5 = GL_ARB_gpu_shader5; alias GL_NV_ray_tracing = GL_EXT_ray_tracing; alias GL_NV_ray_tracing_motion_blur = _GL_NV_ray_tracing_motion_blur | spvRayTracingMotionBlurNV; alias GL_NV_shader_atomic_fp16_vector = _GL_NV_shader_atomic_fp16_vector + _GL_NV_gpu_shader5 | _spirv_1_0; alias GL_NV_shader_invocation_reorder = _GL_NV_shader_invocation_reorder + _GL_EXT_buffer_reference_uvec2 | spvShaderInvocationReorderNV; alias GL_NV_shader_subgroup_partitioned = _GL_NV_shader_subgroup_partitioned | spvGroupNonUniformPartitionedNV; alias GL_NV_shader_texture_footprint = _GL_NV_shader_texture_footprint | spvImageFootprintNV; // Define feature names alias nvapi = hlsl_nvapi; alias raytracing = GL_EXT_ray_tracing | _sm_6_3 | cuda; alias ser = raytracing + GL_NV_shader_invocation_reorder | raytracing + hlsl_nvapi | cuda; alias motionblur = GL_NV_ray_tracing_motion_blur | _sm_6_3 + hlsl_nvapi | cuda; alias rayquery = GL_EXT_ray_query | _sm_6_3; alias raytracing_motionblur = raytracing + motionblur | cuda; alias ser_motion = ser + motionblur; alias shaderclock = GL_EXT_shader_realtime_clock | hlsl_nvapi | cpp | cuda; alias meshshading_internal = GL_EXT_mesh_shader | _sm_6_5 | metal; alias meshshading = amplification_mesh + meshshading_internal; alias fragmentshaderinterlock = _GL_ARB_fragment_shader_interlock | hlsl_nvapi | spvFragmentShaderPixelInterlockEXT; alias atomic64 = GL_EXT_shader_atomic_int64 | _sm_6_6 | cpp | cuda; alias atomicfloat = GL_EXT_shader_atomic_float | _sm_6_0 + hlsl_nvapi | cpp | cuda; alias atomicfloat2 = GL_EXT_shader_atomic_float2 | _sm_6_6 + hlsl_nvapi | cpp | cuda; alias fragmentshaderbarycentric = GL_EXT_fragment_shader_barycentric | _sm_6_1; alias shadermemorycontrol = glsl | _spirv_1_0 | _sm_5_0; alias shadermemorycontrol_compute = raytracingstages_compute + shadermemorycontrol; alias subpass = fragment + _sm_6_0 | fragment + any_gfx_target; alias waveprefix = _sm_6_5 | _cuda_sm_7_0 | GL_KHR_shader_subgroup_arithmetic; alias bufferreference = GL_EXT_buffer_reference; alias bufferreference_int64 = bufferreference + GL_EXT_shader_explicit_arithmetic_types_int64; // Define what each shader model means on different targets. // spirv profile alias spirv_1_0 = _spirv_1_0; alias spirv_1_1 = _spirv_1_1 | spirv_1_0 ; alias spirv_1_2 = _spirv_1_2 | spirv_1_1 ; alias spirv_1_3 = _spirv_1_3 | spirv_1_2 ; alias spirv_1_4 = _spirv_1_4 | spirv_1_3 ; alias spirv_1_5 = _spirv_1_5 + GL_EXT_nonuniform_qualifier + GL_EXT_buffer_reference | spirv_1_4 ; alias spirv_1_6 = _spirv_1_6 + GL_EXT_debug_printf + GL_EXT_demote_to_helper_invocation | spirv_1_5 ; alias spirv_latest = _spirv_1_6; alias SPIRV_1_0 = spirv_1_0; alias SPIRV_1_1 = spirv_1_1; alias SPIRV_1_2 = spirv_1_2; alias SPIRV_1_3 = spirv_1_3; alias SPIRV_1_4 = spirv_1_4; alias SPIRV_1_5 = spirv_1_5; alias SPIRV_1_6 = spirv_1_6; // hlsl profile alias sm_4_0_version = _sm_4_0 | _GLSL_150 | spirv_1_0 | _cuda_sm_2_0 | metal | cpp ; alias sm_4_0 = sm_4_0_version | SPV_GOOGLE_user_type + spvMinLod | GL_ARB_sparse_texture_clamp + GL_EXT_samplerless_texture_functions + GL_EXT_texture_query_lod + GL_EXT_texture_shadow_lod + GL_EXT_debug_printf + GL_ARB_shader_image_size ; alias sm_4_1_version = _sm_4_1 | _GLSL_150 | spirv_1_0 | _cuda_sm_6_0 | metal | cpp ; alias sm_4_1 = sm_4_1_version | GL_ARB_texture_gather + GL_ARB_texture_query_levels + GL_ARB_shader_texture_image_samples // previous | sm_4_0 ; alias sm_5_0_version = _sm_5_0 | _GLSL_330 | spirv_1_0 | _cuda_sm_9_0 | metal | cpp ; alias sm_5_0 = sm_5_0_version | GL_KHR_memory_scope_semantics + GL_ARB_gpu_shader5 + GL_ARB_derivative_control | spvFragmentFullyCoveredEXT // previous | sm_4_1 ; alias sm_5_1_version = _sm_5_1 | _GLSL_330 | spirv_1_0 | _cuda_sm_9_0 | metal | cpp ; alias sm_5_1 = sm_5_1_version | GL_EXT_nonuniform_qualifier + GL_ARB_gpu_shader5 // previous | sm_5_0 ; alias sm_6_0_version = _sm_6_0 | _GLSL_450 | spirv_1_3 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_0 = sm_6_0_version | GL_KHR_shader_subgroup_ballot + GL_KHR_shader_subgroup_shuffle + GL_KHR_shader_subgroup_arithmetic + GL_KHR_shader_subgroup_quad + GL_KHR_shader_subgroup_vote // previous | sm_5_1 ; alias sm_6_1_version = _sm_6_1 | _GLSL_450 | spirv_1_3 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_1 = sm_6_1_version | GL_EXT_fragment_shader_barycentric // previous | sm_6_0 ; alias sm_6_2_version = _sm_6_2 | _GLSL_450 | spirv_1_3 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_2 = sm_6_2_version // previous | sm_6_1 ; alias sm_6_3_version = _sm_6_3 | _GLSL_460 | spirv_1_4 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_3 = sm_6_3_version | GL_EXT_ray_tracing + GL_EXT_ray_tracing_position_fetch_ray_tracing // previous | sm_6_2 ; alias sm_6_4_version = _sm_6_4 | _GLSL_460 | spirv_1_4 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_4 = sm_6_4_version // previous | sm_6_3 ; alias sm_6_5_version = _sm_6_5 | _GLSL_460 | spirv_1_4 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_5 = sm_6_5_version // also requires: GL_NV_shader_subgroup_partitioned | GL_EXT_mesh_shader + GL_EXT_ray_query + GL_EXT_ray_tracing_position_fetch_ray_query // previous | sm_6_4 ; alias sm_6_6_version = _sm_6_6 | _GLSL_460 | spirv_1_4 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_6 = sm_6_6_version | GL_EXT_shader_atomic_int64 + GL_EXT_shader_atomic_float2 + GL_EXT_shader_atomic_float + _GL_EXT_shader_atomic_float_min_max | sm_6_5 ; alias sm_6_7_version = _sm_6_7 | _GLSL_460 | spirv_1_4 | _cuda_sm_9_0 | metal | cpp ; alias sm_6_7 = sm_6_7_version | sm_6_6 ; alias DX_4_0 = sm_4_0; alias DX_4_1 = sm_4_1; alias DX_5_0 = sm_5_0; alias DX_5_1 = sm_5_1; alias DX_6_0 = sm_6_0; alias DX_6_1 = sm_6_1; alias DX_6_2 = sm_6_2; alias DX_6_3 = sm_6_3; alias DX_6_4 = sm_6_4; alias DX_6_5 = sm_6_5; alias DX_6_6 = sm_6_6; alias DX_6_7 = sm_6_7; // glsl profile alias GLSL_130 = _GLSL_130 | _sm_4_0 | _cuda_sm_2_0 | spirv_1_0 | metal | cpp ; alias GLSL_140 = _GLSL_140 | _sm_4_1 | _cuda_sm_2_0 | spirv_1_0 | metal | cpp // previous | GLSL_130 ; alias GLSL_150 = _GLSL_150 | _sm_4_1 | _cuda_sm_2_0 | spirv_1_0 | metal | cpp // extensions to propagate | glsl_spirv + GL_ARB_texture_multisample // previous | GLSL_140 ; alias GLSL_330 = _GLSL_330 | _sm_5_0 | _cuda_sm_6_0 | spirv_1_0 | metal | cpp // previous | GLSL_150 ; alias GLSL_400 = _GLSL_400 | _sm_5_1 | _cuda_sm_6_0 | spirv_1_3 | metal | cpp // extensions to propagate | glsl_spirv + GL_ARB_gpu_shader5 + GL_ARB_texture_gather // previous | GLSL_330 ; alias GLSL_410 = _GLSL_410 | _sm_5_1 | _cuda_sm_6_0 | spirv_1_3 | metal | cpp // previous | GLSL_400 ; alias GLSL_420 = _GLSL_420 | _sm_5_1 | _cuda_sm_6_0 | spirv_1_3 | metal | cpp // extensions to propagate | glsl_spirv + GL_ARB_shader_image_load_store // previous | GLSL_410 ; alias GLSL_430 = _GLSL_430 | _sm_5_1 | _cuda_sm_6_0 | spirv_1_3 | metal | cpp // extensions to propagate | glsl_spirv + GL_ARB_shader_image_size + GL_ARB_texture_query_levels // previous | GLSL_420 ; alias GLSL_440 = _GLSL_440 | _sm_6_0 | _cuda_sm_6_0 | spirv_1_3 | metal | cpp // previous | GLSL_430 ; alias GLSL_450 = _GLSL_450 | _sm_6_0 | _cuda_sm_6_0 | spirv_1_3 | metal | cpp // extensions to propagate | glsl_spirv + GL_ARB_derivative_control + GL_ARB_shader_texture_image_samples // previous | GLSL_440 ; alias GLSL_460 = _GLSL_460 | _sm_6_6 | _cuda_sm_6_0 | spirv_1_3 | metal | cpp // previous | GLSL_450 ; alias GLSL_410_SPIRV_1_0 = _GLSL_410 | spirv_1_0; alias GLSL_420_SPIRV_1_0 = _GLSL_420 + GLSL_410_SPIRV_1_0 | GLSL_410_SPIRV_1_0; alias GLSL_430_SPIRV_1_0 = _GLSL_430 + GLSL_420_SPIRV_1_0 | GLSL_420_SPIRV_1_0; // cuda profile alias cuda_sm_1_0 = _cuda_sm_1_0 | sm_4_0; alias cuda_sm_2_0 = _cuda_sm_2_0 | sm_4_1; alias cuda_sm_3_0 = _cuda_sm_3_0 | sm_6_0; alias cuda_sm_3_5 = _cuda_sm_3_5 | sm_6_0; alias cuda_sm_4_0 = _cuda_sm_4_0 | sm_6_0; alias cuda_sm_5_0 = _cuda_sm_5_0 | sm_6_0; alias cuda_sm_6_0 = _cuda_sm_6_0 | sm_6_0; alias cuda_sm_7_0 = _cuda_sm_7_0 | sm_5_1; alias cuda_sm_8_0 = _cuda_sm_8_0 | sm_5_1; alias cuda_sm_9_0 = _cuda_sm_9_0 | sm_5_1; // metal profile alias METAL_2_3 = metallib_2_3; alias METAL_2_4 = metallib_2_4; alias METAL_3_0 = metallib_3_0; alias METAL_3_1 = metallib_3_1; // Profiles of convenience alias appendstructuredbuffer = sm_5_0_version; alias atomic_hlsl = _sm_4_0; alias atomic_hlsl_nvapi = _sm_4_0 + hlsl_nvapi; alias atomic_hlsl_sm_6_6 = _sm_6_6; alias byteaddressbuffer = sm_4_0_version; alias byteaddressbuffer_rw = sm_4_0_version; alias consumestructuredbuffer = sm_5_0_version; alias fragmentprocessing = fragment + _sm_5_0 | fragment + glsl_spirv | raytracingstages_compute_amplification_mesh + GL_NV_compute_shader_derivatives | fragment + metal | fragment + cpp | fragment + cuda ; alias fragmentprocessing_derivativecontrol = fragment + _sm_5_0 | fragment + GL_ARB_derivative_control | raytracingstages_compute_amplification_mesh + GL_NV_compute_shader_derivatives ; alias getattributeatvertex = fragment + _sm_6_1 | fragment + GL_EXT_fragment_shader_barycentric; alias memorybarrier = sm_5_0_version; alias structuredbuffer = sm_4_0_version; alias structuredbuffer_rw = sm_4_0_version; alias texture_sm_4_0 = sm_4_0_version | GL_ARB_sparse_texture_clamp + GL_EXT_texture_query_lod ; alias texture_sm_4_1 = sm_4_1_version | GL_ARB_sparse_texture_clamp + GL_EXT_texture_query_lod ; alias texture_sm_4_1_samplerless = texture_sm_4_1 // add samplerless to all targets that need an extension | GL_EXT_samplerless_texture_functions ; // supposedly works on only limited stages, support all stages for now alias texture_sm_4_1_compute_fragment = texture_sm_4_1; alias texture_sm_4_0_fragment = texture_sm_4_0; alias texture_sm_4_1_clamp_fragment = texture_sm_4_0_fragment | GL_ARB_sparse_texture_clamp; alias texture_sm_4_1_vertex_fragment_geometry = texture_sm_4_1; alias texture_gather = texture_sm_4_1_vertex_fragment_geometry | GL_ARB_texture_gather; alias image_samples = texture_sm_4_1_compute_fragment | GL_ARB_shader_texture_image_samples; alias image_size = texture_sm_4_1_compute_fragment | GL_ARB_shader_image_size; alias texture_size = texture_sm_4_1 | GL_ARB_shader_image_size; alias texture_querylod = texture_sm_4_1 | GL_EXT_texture_query_lod; alias texture_querylevels = texture_sm_4_1 | GL_ARB_texture_query_levels; alias texture_shadowlod = texture_sm_4_1 | GL_EXT_texture_shadow_lod | texture_sm_4_1; alias atomic_glsl_float1 = GL_EXT_shader_atomic_float; alias atomic_glsl_float2 = GL_EXT_shader_atomic_float2; alias atomic_glsl_halfvec = GL_NV_shader_atomic_fp16_vector; alias atomic_glsl = spirv_1_0 | _GLSL_400; alias atomic_glsl_int64 = atomic_glsl + GL_EXT_shader_atomic_int64; alias GLSL_430_SPIRV_1_0_compute = GLSL_430_SPIRV_1_0 + compute; alias image_loadstore = GL_EXT_shader_image_load_store + GLSL_420; alias nonuniformqualifier = sm_5_1; alias printf = GL_EXT_debug_printf | _sm_4_0 | _cuda_sm_2_0 | cpp; alias texturefootprint = GL_NV_shader_texture_footprint + GLSL_450 | hlsl_nvapi + _sm_4_0; alias texturefootprintclamp = texturefootprint + GL_ARB_sparse_texture_clamp; alias shader5_sm_4_0 = GL_ARB_gpu_shader5 | sm_4_0_version; alias shader5_sm_5_0 = GL_ARB_gpu_shader5 | sm_5_0_version; alias subgroup_basic = GL_KHR_shader_subgroup_basic | _sm_6_0 | _cuda_sm_7_0; alias subgroup_ballot = spirv_1_0 + GL_KHR_shader_subgroup_ballot | glsl + GL_KHR_shader_subgroup_ballot + shader5_sm_5_0 | _sm_6_0 + shader5_sm_5_0 | _cuda_sm_7_0 + shader5_sm_5_0 ; alias subgroup_ballot_activemask = spirv_1_0 + GL_KHR_shader_subgroup_ballot | glsl + GL_KHR_shader_subgroup_ballot | _sm_6_0 | _cuda_sm_7_0 ; alias subgroup_basic_ballot = glsl + GL_KHR_shader_subgroup_basic + subgroup_ballot | spirv + GL_KHR_shader_subgroup_basic + subgroup_ballot | hlsl + subgroup_ballot | cuda + subgroup_ballot ; alias subgroup_vote = GL_KHR_shader_subgroup_vote | _sm_6_0 | _cuda_sm_7_0; alias shaderinvocationgroup = subgroup_vote; alias subgroup_arithmetic = GL_KHR_shader_subgroup_arithmetic | _sm_6_0 | _cuda_sm_7_0; alias subgroup_shuffle = GL_KHR_shader_subgroup_shuffle | _sm_6_0 | _cuda_sm_7_0; alias subgroup_shufflerelative = GL_KHR_shader_subgroup_shuffle_relative | _sm_6_0 | _cuda_sm_7_0; alias subgroup_clustered = GL_KHR_shader_subgroup_clustered | _sm_6_0 | _cuda_sm_7_0; alias subgroup_quad = GL_KHR_shader_subgroup_quad | _sm_6_0 | _cuda_sm_7_0; alias subgroup_partitioned = GL_NV_shader_subgroup_partitioned + subgroup_ballot_activemask | _sm_6_5 | _cuda_sm_7_0; alias atomic_glsl_hlsl_nvapi_cuda_metal_float1 = atomic_glsl_float1 | hlsl_nvapi + _sm_4_0 | _cuda_sm_2_0 | metal; alias atomic_glsl_hlsl_nvapi_cuda5_int64 = atomic_glsl_int64 | hlsl_nvapi + _sm_4_0 | _cuda_sm_6_0; alias atomic_glsl_hlsl_nvapi_cuda6_int64 = atomic_glsl_int64 | hlsl_nvapi + _sm_4_0 | _cuda_sm_6_0; alias atomic_glsl_hlsl_nvapi_cuda9_int64 = atomic_glsl_int64 | hlsl_nvapi + _sm_4_0 | _cuda_sm_9_0; alias atomic_glsl_hlsl_cuda_metal = atomic_glsl | _sm_5_0 | _cuda_sm_2_0 | metal; alias atomic_glsl_hlsl_cuda9_int64 = atomic_glsl_int64 | _sm_6_6 | _cuda_sm_9_0 | metal; alias helper_lane = _sm_6_0 + fragment | GL_EXT_demote_to_helper_invocation + fragment | metal + fragment ; alias breakpoint = GL_EXT_debug_printf | hlsl | _cuda_sm_8_0 | cpp; alias raytracing_allstages = raytracing_stages + raytracing; alias raytracing_anyhit = anyhit + raytracing; alias raytracing_intersection = intersection + raytracing; alias raytracing_anyhit_closesthit = anyhit_closesthit + raytracing; alias raytracing_anyhit_closesthit_intersection = anyhit_closesthit_intersection + raytracing; alias raytracing_raygen_closesthit_miss = raygen_closesthit_miss + raytracing; alias raytracing_anyhit_closesthit_intersection_miss = anyhit_closesthit_intersection_miss + raytracing; alias raytracing_raygen_closesthit_miss_callable = raygen_closesthit_miss_callable + raytracing; alias raytracing_position = raytracing + GL_EXT_ray_tracing_position_fetch_ray_tracing + anyhit_closesthit; alias raytracing_motionblur_anyhit_closesthit_intersection_miss = anyhit_closesthit_intersection_miss + raytracing_motionblur; alias raytracing_motionblur_raygen_closesthit_miss = raygen_closesthit_miss + raytracing_motionblur; alias rayquery_position = rayquery + GL_EXT_ray_tracing_position_fetch_ray_query; alias ser_raygen = raygen + ser; alias ser_raygen_closesthit_miss = raygen_closesthit_miss + ser; alias ser_any_closesthit_intersection_miss = anyhit_closesthit_intersection_miss + ser; alias ser_anyhit_closesthit_intersection = anyhit_closesthit_intersection + ser; alias ser_anyhit_closesthit = anyhit_closesthit + ser; alias ser_motion_raygen_closesthit_miss = raygen_closesthit_miss + ser_motion; alias ser_motion_raygen = raygen + ser_motion; alias all = _sm_6_7 + hlsl_nvapi | sm_6_7 + ser + shaderclock + texturefootprint + fragmentshaderinterlock + _GL_NV_shader_subgroup_partitioned + _GL_NV_ray_tracing_motion_blur + _GL_NV_shader_texture_footprint | spirv_1_5 + sm_6_7 + ser + shaderclock + texturefootprint + fragmentshaderinterlock + spvGroupNonUniformPartitionedNV + spvRayTracingMotionBlurNV + spvRayTracingMotionBlurNV;