Skip to content

Wgsl struct constructor failed #4953

@Alphapage

Description

@Alphapage

Hello,

This code doesn't work:

https://google.github.io/tour-of-wgsl/types/structures/

It fails with error:

Shader validation error:
┌─ Fragment shader:7:19

7 │ const a_bicycle = Vehicle(2, 10.5);
│ ^^^^^^^^^^^^^^^^ naga::Expression [3]

Constant expression [3] is invalid
Composing 0's component type is not expected

Platform
MacOs, wgpu:0.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions