Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow float modulo for scalar-vector and vector-scalar #2450

@amaiorano

Description

@amaiorano

Currently in the spec, division and modulo are non-orthogonal: float division is defined for scalar-vector and vector-scalar, but float modulo is not.

We can see this non-orthogonality in section [6.9. Arithmetic Expressions](6.9. Arithmetic Expressions):

For scalar-scalar and vector-vector, division and modulo are effectively the same:

image

But for mixed scalar-vector and vector-scalar, modulo is separate and only defined for i32 and u32:

image

Since we already define float modulo for scalar-scalar and vector-vector, why not define it for the mixed versions?

Metadata

Metadata

Assignees

Labels

wgslWebGPU Shading Language Issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions