KhronosGroup / KhronosGroup/glslang

RFC: Deprecate and ultimately remove the HLSL front-end

Open
#4,210 25 comments 6 reactions 1 assignee Claimed by @dnovillo View on GitHub
Dominant language
C++
Stars
3.6k
Forks
989
Avg merge
1d 2h
Merged PRs (30d)
31

Description

Back in 2022, @dj2 floated the idea that the HLSL front-end is not worth maintaining anymore (#2971). At the time, the conclusion was that maintenance is not a huge burden and there was objections from users deploying HLSL compilers in environments such as iOS, Android and tvOS.

In the last 4 years, DXC has come a long way and the language has evolved way beyond what glslang supports today.

I want to bring up this discussion up again, with the following proposal:

1. Formally mark the HLSL front-end as deprecated in the README and release notes.
2. Direct users to DXC (https://github.com/microsoft/DirectXShaderCompiler) and Slang (https://github.com/shader-slang/slang) as alternatives.
3. Continue accepting bug fixes during the deprecation period.
4. Remove the front-end at the next major version, with at least 18 months of notice from the deprecation announcement.

**What would break**: Any caller using `EShSourceHlsl` or the HLSL message flags (`EShMsgReadHlsl`, etc.) would need to migrate. This is a breaking API change and is the reason a major version bump is required.

I would like to avoid having to deal with security issues in the HLSL front-end and any other bugs that may require paying attention to a language that is better served by the current alternatives (mostly DXC, but clang-dxc in the medium/long-term).

Does this sound reasonable? I'm happy to do the removal work if there is agreement on the plan. I would love to get rid of O(20,000) lines of code that are not adding a lot of value to this compiler.

@TheMostDiligent is DXC still not a valid replacement for your use-case? I saw the analysis you posted in https://github.com/KhronosGroup/glslang/issues/2971#issuecomment-1174888424 and I'm also not sure whether the issues reported by AnKi in https://anki3d.org/workarounds-for-issues-with-mesh-shaders-vulkan-hlsl/ are still present.

Thanks. Diego.

NOTE: Tagging folks who participated in previous discussions I read while preparing this: @dj2 @TheMostDiligent @dneto0 @arcady-lunarg @dgkoch @godlikepanos

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.