diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/hlsl.meta.slang | 19 | ||||
| -rw-r--r-- | source/slang/slang-capabilities.capdef | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index b282dca2a..5564094db 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -20229,3 +20229,22 @@ struct ConstBufferPointer } } } + +__glsl_version(450) +__glsl_extension(GL_ARB_shader_clock) +__target_intrinsic(glsl, clock2x32ARB) +[require(glsl_spirv, GL_ARB_shader_clock)] +uint2 clock2x32ARB() +{ + __target_switch + { + case glsl: __intrinsic_asm "clock2x32ARB"; + case spirv: + const uint32_t scopeId_subgroup = 3; + return spirv_asm { + OpCapability ShaderClockKHR; + OpExtension "SPV_KHR_shader_clock"; + result:$$uint2 = OpReadClockKHR $scopeId_subgroup; + }; + } +} diff --git a/source/slang/slang-capabilities.capdef b/source/slang/slang-capabilities.capdef index 140346163..4f71eb823 100644 --- a/source/slang/slang-capabilities.capdef +++ b/source/slang/slang-capabilities.capdef @@ -316,6 +316,7 @@ 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_KHR_memory_scope_semantics : _GLSL_420; def _GL_KHR_shader_subgroup_arithmetic : _GLSL_140; @@ -370,6 +371,7 @@ alias GL_ARB_shader_texture_image_samples = _GL_ARB_shader_texture_image_samples 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_KHR_memory_scope_semantics = _GL_KHR_memory_scope_semantics | _spirv_1_0; alias GL_KHR_shader_subgroup_arithmetic = _GL_KHR_shader_subgroup_arithmetic | spvGroupNonUniformArithmetic; |
