KhronosGroup / KhronosGroup/glslang
Feature request: HLSL invariant position output library/command-line option
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 989
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
As far as I'm aware, HLSL does not have the equivalent of Invariant in SPIR-V. The HLSL precise keyword will produce SPIR-V with NoContraction, but there is no way to produce something that is Invariant. This can be necessary for multi-pass algorithms.
I would propose either:
1. Add a command-line + library option to enable invariant output on SV_Position
or
2. Add an additional modifier to HLSL 'invariant' that can be used just like 'precise', but produces Invariant instead of NoContraction
I guess another alternative would be to have the command-line/library flag treat precise as invariant.
Contributor guide
Research direction
The request concerns HLSL handling, SV_Position output, SPIR-V invariant behavior, and command-line or library options, but it names no files or tests. Start by locating the HLSL compiler entry points and option handling, then determine which proposed behavior is accepted; done means the selected invariant-output approach works for the relevant multi-pass use case and is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100