shader-slang / slang

Making it easier to work with shaders
MIT License
1.78k stars 159 forks source link

Remove returned-array-legalization pass for metal #4478

Closed ArielG-NV closed 1 day ago

ArielG-NV commented 3 days ago

fixes: #4468 fixes: tests\bugs\gh-2959.slang, part of https://github.com/shader-slang/slang/issues/4291

problem: legalizeArrayReturnType does not assign an address space to an expected pointer argument of an automatically generated/modified function.

solution: Remove returned-array-legalization pass for metal, then we won't generate a function that requires legalization.

ArielG-NV commented 2 days ago

The higher level question is, do we really need legalizeArrayReturnType for metal?

Let me test if we can remove the pass for metal.