Sitelet https://github.com/gpuweb/gpuweb/issues/2469
Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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