Clean up output Vertices
and Indices
types for mesh shader.
#2804
Labels
goal:quality & productivity
Quality issues and issues that impact our productivity coding day to day inside slang
kind:cleanup
tech debt and rough edges
priority:medium
nice to have in next milestone
Milestone
In our mesh shader representation, we currently use
out Vertices<T>
andout Indices<T>
type to represent output vertex and index arrays.This representation isn't aligned with the semantics of
out
parameters. In this case, aVertex<T>
type represents a reference to a output buffer, and the reference itself shouldn't be anout
. Instead, we should introduceOutputVertices<T>
type and turn the parameter into justOutputVertices<T>
type, similar to howOutputPatch
type works.The current representation caused an issue in the uninitialized
out
parameter checking pass (slang-ir-use-uninitialized-out-param.cppbecause we will generate code that first
loadthe reference from the
out` parameter, and then write to the reference, which isn't correct in terms of types.After we clean this up, we should be able to remove the temporary hack that skips checking these parameters in the
slang-ir-use-uninitialized-out-param
pass.The text was updated successfully, but these errors were encountered: