diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2024-06-13 19:12:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-13 16:12:42 -0700 |
| commit | 2407966e899f9e4f490b23a92fc06d5da20544cc (patch) | |
| tree | 42472b1420a61441cb9d70a8ba860310b0531e13 /tests/ir | |
| parent | fba316f0e7dacc7f93bee3a95fb93b2ab02bdd80 (diff) | |
SPIR-V `SV_InstanceId` support in pixel shader (#4368)
* solve issue by making 'non SV for SPIRV' system semantics, no longer an SV once diagnosed by slang
Problem:
1. SV_InstanceID (HLSL) is allowed as an output semantic with HLSL, it is also allowed for input into pixel shader. We need to account for multiple entry points in 1 file using both of these scenarios at once.
2. SPIRV does not allow `SV_InstanceID` as a builtin, `SV_InstanceID` must be passed as a regular `flat` `Input` from vertex shader.
Solution: Slang needs to treat these SV objects as non built-in's. As a result:
1. Slang needs to allocate for vertex output and fragment Input binding slots for all SV_InstanceID uses (if the target is SPIRV). This allows Slang to prepare an open slot to bind these SV objects to.
2. Slang needs to not emit built in modifier for these not actual built in variables (under the specific circumstances described).
note: `VarLayout` was made not `HOISTABLE` since I don't believe it needs to be `HOISTABLE`.
* The code can be made to work even if `VarLayout` is `HOISTABLE`.
* fix compile warnings
* address review comments and reimplement operand removal
1. remove an operand by selectively copying operands
2. test to ensure `Flat` is in the test shaders
* we do not need to manually add `Flat` in the code since this is done for us in emit-spirv. This is the behavior since `uint` on a fragment `Input` must be `Flat`, else it is a VK validation error.
* address review
remove clone logic
* address review
remove unused function
reserve instead of setCount with ShortList
Diffstat (limited to 'tests/ir')
0 files changed, 0 insertions, 0 deletions
