diff options
| author | Darren Wihandi <65404740+fairywreath@users.noreply.github.com> | 2025-03-19 17:53:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-19 21:53:57 +0000 |
| commit | 404e95cdd02830ba0fb215081e826025609c4d14 (patch) | |
| tree | 4f68e2476a29372c385329e709719f2f51e3055d /source | |
| parent | 155e0804edbc9e7175cb0a6ed60d3daff0ba5e01 (diff) | |
Output SPV_KHR_compute_shader_derivatives extension string instead of the NV extension (#6641)
* Output SPV_KHR_compute_shader_derivatives instead of the NV extension
* add alias for nv extension
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-capabilities.capdef | 8 | ||||
| -rw-r--r-- | source/slang/slang-emit-spirv.cpp | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/source/slang/slang-capabilities.capdef b/source/slang/slang-capabilities.capdef index 2285bd2e5..749a72e3b 100644 --- a/source/slang/slang-capabilities.capdef +++ b/source/slang/slang-capabilities.capdef @@ -527,7 +527,11 @@ def SPV_NV_shader_image_footprint : _spirv_1_0; /// Represents the SPIR-V extension for compute shader derivatives. /// [EXT] -def SPV_NV_compute_shader_derivatives : _spirv_1_0; +def SPV_KHR_compute_shader_derivatives : _spirv_1_0; + +/// Represents the SPIR-V extension for compute shader derivatives. +/// [EXT] +alias SPV_NV_compute_shader_derivatives = SPV_KHR_compute_shader_derivatives; /// Represents the SPIR-V extension for SPV_GOOGLE_user_type. /// [EXT] @@ -971,7 +975,7 @@ alias GL_KHR_shader_subgroup_vote = _GL_KHR_shader_subgroup_vote | spvGroupNonUn /// Represents the GL_NV_compute_shader_derivatives extension. /// [EXT] -alias GL_NV_compute_shader_derivatives = _GL_NV_compute_shader_derivatives | SPV_NV_compute_shader_derivatives | _sm_6_6; +alias GL_NV_compute_shader_derivatives = _GL_NV_compute_shader_derivatives | SPV_KHR_compute_shader_derivatives | _sm_6_6; /// Represents the GL_NV_fragment_shader_barycentric extension. /// [EXT] diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 758e1ca7e..266f3b7e9 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -3603,7 +3603,7 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex continue; ensureExtensionDeclaration( - UnownedStringSlice("SPV_NV_compute_shader_derivatives")); + UnownedStringSlice("SPV_KHR_compute_shader_derivatives")); auto numThreadsDecor = entryPointDecor->findDecoration<IRNumThreadsDecoration>(); if (isQuad) @@ -3617,8 +3617,8 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex requireSPIRVExecutionMode( nullptr, getIRInstSpvID(entryPoint), - SpvExecutionModeDerivativeGroupQuadsNV); - requireSPIRVCapability(SpvCapabilityComputeDerivativeGroupQuadsNV); + SpvExecutionModeDerivativeGroupQuadsKHR); + requireSPIRVCapability(SpvCapabilityComputeDerivativeGroupQuadsKHR); } else { @@ -3631,8 +3631,8 @@ struct SPIRVEmitContext : public SourceEmitterBase, public SPIRVEmitSharedContex requireSPIRVExecutionMode( nullptr, getIRInstSpvID(entryPoint), - SpvExecutionModeDerivativeGroupLinearNV); - requireSPIRVCapability(SpvCapabilityComputeDerivativeGroupLinearNV); + SpvExecutionModeDerivativeGroupLinearKHR); + requireSPIRVCapability(SpvCapabilityComputeDerivativeGroupLinearKHR); } } |
