这是indexloc提供的服务,不要输入任何密码
Skip to content

Should we constrain the location of user input-output stage variables WGSL #1962

@Kangz

Description

@Kangz

While implementing maxInterStageShaderComponents @Jiawei-Shao noticed that Vulkan had some constraints on the location of shader input/output variables:

According to Vulkan SPEC, "Each effective Location must have a value less than the number of location available for the given interface"

This means that Vulkan requires that the location be less than maxInterStageShaderComponents / 4, at least at first glance. I believe that since we require that interfaces match exactly between shaders, we can, during createShaderModule, renumber the IO variables of entrypoints and pack them in maxInterStageShaderComponents / 4 vec4 but that's a bit complicated and could be done post-MVP.

Any concerns with adding a limitations that locations must be less than maxInterStageShaderComponents / 4?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions