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

Why are bind group layout fields spelled differently from their WGSL counterparts? #2469

@magcius

Description

@magcius

https://gpuweb.github.io/gpuweb/#abstract-opdef-default-pipeline-layout

As an example:

Else if the sampled type of resource is:

  • f32 and resource is statically used with a textureSample* builtin in the shader
    Set textureLayout.sampleType to "float"
  • f32 otherwise
    Set textureLayout.sampleType to "unfilterable-float"
  • i32
    Set textureLayout.sampleType to "sint"
  • u32
    Set textureLayout.sampleType to "uint"

Is there a reason why the WGSL type name is "u32", and the bind-group-layout type name is "uint"? Making these more similar would help reduce cognitive load when translating layouts between shaders and the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions