Skip to content

RFC: Deprecate and ultimately remove the HLSL front-end #4210

Description

@dnovillo

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 #2971 (comment) 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions