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

Missing Abstract Int/Float preconditions for Conversion Expressions #2788

Description

@teoxoy

Missing Abstract Int/Float preconditions for Conversion Expressions


bool

  • Abstract Int/Float -> bool (table entries could be reduced to 2 and preconditions changed to say AbstractInt, i32 or u32 and AbstractFloat, f32 or f16)

    image

i32

  • AbstractInt -> i32

  • AbstractFloat -> i32 (table entries could be reduced to 1 and preconditions changed to say AbstractFloat, f32 or f16)

    image

u32

  • AbstractInt -> u32 (I think the table entry for this is wrong since it says "Reinterpretation of bits" and AbstractInt's are essentially i64's)

    image

  • AbstractFloat -> u32 (again, table entries could be reduced to 1 and preconditions changed to say AbstractFloat, f32 or f16)

    image

f32 and f16

  • AbstractInt -> f32 / f16 (again, table entries could be reduced to 1 for each and preconditions changed to say AbstractInt, i32 or u32)
  • AbstractFloat -> f32 / f16

The list above is concerned with "Scalar conversion type rules" but the same adjustments could be done for the "Vector conversion type rules" and "Matrix conversion type rules" sections.

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

    wgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions