Open ArielG-NV opened 2 days ago
note: this is very similar to hoistEntryPointParameterFromStruct
Is this duplicate to https://github.com/shader-slang/slang/issues/4375 ?
Is this duplicate to https://github.com/shader-slang/slang/issues/4375 ?
Looks like it is a partial duplicate.
[[color(n)]]
is fragment shader, not vertex shader. I noticed the issue does discuss fragment shader inputs though.
Plan to fix the following issues:
1. Allow n number "allowed types" instead of only two "allowed types" for when legalizing System Semantics
for Metal
2. Move parts of legalizeEntryPointForMetal
into EntryPointVaryingParamLegalizeContext
so code compiles
3. Restructure so User Input Semantics legalization works
4. Restructure so User Output Semantics legalization works.
5. Restructure so System Semantic legalization works
6. Add logic to legalize Structs for attributes.
breaks compile of (non exhaustive list, seems to be quite a number of tests):
tests\compute\constexpr.slang
tests\compute\compile-time-loop.slang
tests\compute\discard-stmt.slang
tests\compute\texture-sampling.slang
problem: the following metal code is allowed:
the following metal code is not allowed (Slang generates the following code if
struct
wrapping aSV_Target
):Specifically, metal allows
[[color()]]
and[[attribute()]]
to only be annotated onPRIMITIVE
andvector<PRIMITIVE,N>
.