-
Notifications
You must be signed in to change notification settings - Fork 368
Open
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues
Milestone
Description
This might be supplanted by other features, but it would be helpful to have some form of basic enum syntax to declare integer constants. A very basic strawman is below:
enum BlendMode {
Normal = 1,
Add,
Subtract,
Multiply,
Overlay,
HardLight,
};
struct BlendParams {
blend_mode: BlendMode, // the same size as a u32,
};
Alternatively, if we had support for user namespaces, we could use const statements to declare u32 variables inside a namespace; this loses the ability to have enums as a separate "type" that can be embedded in structs and passed to functions, but it would be OK to start with.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues