-
Notifications
You must be signed in to change notification settings - Fork 345
Closed
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues
Description
Do we need any kind of constant propagation in WGSL?
This is one of the examples from Metal Shading Language document:
constexpr constant uint MAX_LIGHTS=4;
struct LightDesc{
uint num_lights;
float4 light_position[MAX_LIGHTS];
float4 light_color[MAX_LIGHTS];
float4 light_attenuation_factors[MAX_LIGHTS];
};It relies on the MAX_LIGHTS constant to be propagated to define the array sizes.
Related to #572 : specialization constants aren't going to be "real" constants since in MSL they can't be used for array sizes, if I understand correctly.
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues