wgpu/typos.toml
Jim Blandy 7da699608d [naga] Support MathFunction overloads correctly.
Define a new trait, `proc::builtins::OverloadSet`, for types that
represent a Naga IR builtin function's set of overloads. The
`OverloadSet` trait includes operations needed to validate calls,
choose automatic type conversions, and generate diagnostics.

Add a new function, `ir::MathFunction::overloads`, which returns the
given `MathFunction`'s set of overloads as an `impl OverloadSet`
value. Use this in the WGSL front end, the validator, and the
typifier.

To support `MathFunction::overloads`, provide two implementations
of `OverloadSet`:

- `List` is flexible but verbose.

- `Regular` is concise but more restrictive.

Some snapshot output is affected because `TypeResolution::Handle`
values turn into `TypeResolution::Value`, since the function database
constructs the return type directly.

To work around #7405, avoid offering abstract-typed overloads of some
functions.

This addresses #6443 for `MathFunction`, although that issue covers
other categories of operations as well.
2025-04-02 18:27:19 -04:00

42 lines
957 B
TOML

[files]
# Include .github, .cargo, etc.
ignore-hidden = false
extend-exclude = [
'/.git',
# spirv-asm isn't real source code
'*.spvasm',
'docs/big-picture.xml',
# This test has weird pattern-derived variable names.
'naga/tests/in/wgsl/abstract-types-builtins.wgsl',
]
# Corrections take the form of a key/value pair. The key is the incorrect word
# and the value is the correct word. If the key and value are the same, the
# word is treated as always correct. If the value is an empty string, the word
# is treated as always incorrect.
[default.extend-words]
# Things that aren't typos
lod = "lod"
metalness = "metalness"
# Usernames
Healthire = "Healthire"
REASY = "REASY"
[type.rust.extend-identifiers]
ANDed = "ANDed"
D3DCOLORtoUBYTE4 = "D3DCOLORtoUBYTE4"
Derivate = "Derivate"
inout = "inout"
Ect = "Ect"
[type.wgsl]
extend-glob = ["*.wgsl"]
[type.wgsl.extend-identifiers]
pn = "pn"
[type.yaml.extend-words]
dota = "dota"