Andy Leiserson
7e5f016ca7
chore(cts): Enable test fixed by objc2 ( #8950 )
...
Closes #7357
2026-01-28 07:56:16 -08:00
Jim Blandy
66f95269b5
[naga wgsl-in]: Rename error variant field for clarity.
...
Rename `naga::front::wgsl::error::Error::MissingTemplateArg::arg` to
`description`, to make it a little more specific.
2026-01-28 12:00:35 +01:00
Jim Blandy
63d6c34859
[naga wgsl-in] Flatten control flow for clarity.
...
Adjust some methods of `TemplateListIter` to ensure that the typical
complete control flow through the function follows the outermost
nesting level.
2026-01-28 12:00:35 +01:00
Jim Blandy
81a1e8d3cf
[naga wgsl-in] Don't permit template parameters after enumerants.
2026-01-28 12:00:35 +01:00
Jim Blandy
7b3c7f7da7
[naga] Simplify proc::Namer's handling of struct member names.
...
Rather than passing `call_impl` an `ignore_builtin_identifiers` flag
and plumbing that through from its points of use, extend
`Namer::namespace` to suspend the `builtin_identifiers` table, as it
does for `unique` already. The resulting behavior is the same.
2026-01-28 12:00:35 +01:00
Jim Blandy
85bd8b45bd
[naga wgsl-in] Doc fixes.
2026-01-28 12:00:35 +01:00
Jim Blandy
71f186a032
[naga wgsl-in] Minor rearrangement to flatten control flow.
...
Use `if let`, `let else`, and `Option` methods to reduce nesting and
clarify success paths.
2026-01-28 12:00:35 +01:00
Jim Blandy
555bc09017
[naga wgsl-in] Use typical abbreviations in map_predeclared_type.
2026-01-28 12:00:35 +01:00
teoxoy
307f1fb697
[wgsl-in] move enumerant & var_address_space functions on ExpressionContext
2026-01-28 12:00:35 +01:00
Jim Blandy
2737e9e0ca
[naga wgsl-in] Doc fixes.
...
- Clarify that various `foo_statement` functions on `Parser` do not
consume the statement's final `;`.
- Various other doc fixes throughout.
2026-01-28 12:00:35 +01:00
Jim Blandy
5217dbdfa3
[naga wgsl-in] Rename TemplateListIter::scalar to scalar_ty.
...
The name `scalar` suggests that it returns a scalar value, and
`scalar_ty` is analogous to `ty`.
2026-01-28 12:00:35 +01:00
Jim Blandy
0c77a1f6ca
[naga wgsl-in] Remove unnecessary dependencies.
...
Avoid adding entries to `ExpressionContext::unresolved` for
identifiers that `ExpressionContext::ident_expr` has already
processed.
At the moment, there is no way these could cause a bug: they only
occur after we've recognized a call/construction expression, and those
can never refer to function-local definitions, so the string in
question is certain to have already been added to `unresolved` by
`ExpressionContext::ident_expr`. But they're redundant, and if Naga
ever supported nested functions or local type aliases, these could end
up adding extraneous dependencies.
2026-01-28 12:00:35 +01:00
Jim Blandy
ada7681067
[naga wgsl-in] Rename consume_tokens to discover_template_lists.
2026-01-28 12:00:35 +01:00
Jim Blandy
1ef660f133
[naga wgsl-in] Use Option::is_some_and where appropriate.
2026-01-28 12:00:35 +01:00
Jim Blandy
c7a43a2e9f
[naga wgsl-in] Rename component_or_swizzle_specifier arg.
...
In `naga::front::wgsl::parse::Parser::component_or_swizzle_specifier`,
since `span_start` sounds like the start of a span, rename that
argument to `expr_start`, since it is the span of the start of the
expression that ends with the component or swizzle specifier.
2026-01-28 12:00:35 +01:00
teoxoy
94cc5187dd
[wgsl] pass expected token to functions that might not match any tokens
...
This improves errors making them more general where appropriate.
2026-01-28 12:00:35 +01:00
teoxoy
ac18c06ba6
[wgsl-out] avoid shadowing built-ins
2026-01-28 12:00:35 +01:00
teoxoy
34ab7363ef
adjust GLSL snapshots
2026-01-28 12:00:35 +01:00
teoxoy
563309c299
document consume_tokens
2026-01-28 12:00:35 +01:00
teoxoy
8ad20b247b
add test_template_list test
2026-01-28 12:00:35 +01:00
teoxoy
2dffab15bf
add shadowing_predeclared_types test
2026-01-28 12:00:35 +01:00
teoxoy
1ef831ad2c
handle all type resolution in the lowerer
2026-01-28 12:00:35 +01:00
teoxoy
cb401cef90
handle bitcast, coopLoad and construction exprs in the lowerer
2026-01-28 12:00:35 +01:00
teoxoy
514d0e743d
handle var decl template list in the lowerer
2026-01-28 12:00:35 +01:00
teoxoy
cfd3434f83
add TemplateArgsStart & TemplateArgsEnd tokens
2026-01-28 12:00:35 +01:00
teoxoy
c20919c5ee
[wgsl] update reserved list to latest CR
2026-01-28 12:00:35 +01:00
teoxoy
17e3d2e2f2
implement template list discovery
2026-01-28 12:00:35 +01:00
teoxoy
1a49dbfa19
add Lexer::span_with_start
2026-01-28 12:00:35 +01:00
teoxoy
626f5514b6
remove Clone derive from the Lexer
...
also fixes spans in some cases
2026-01-28 12:00:35 +01:00
teoxoy
fca3c2ea70
avoid recursing into unary_expression
2026-01-28 12:00:35 +01:00
teoxoy
203fda16b7
use lexer.next() in unary_expression
2026-01-28 12:00:35 +01:00
teoxoy
7c36c7d9bd
rename function_call to call_expression
2026-01-28 12:00:35 +01:00
teoxoy
a8e42bc78a
use lexer.next() in primary_expression
2026-01-28 12:00:35 +01:00
teoxoy
e5898027cf
rename Lexer skip to next_if
2026-01-28 12:00:35 +01:00
teoxoy
295b231c06
use lexer.skip() in one more place
2026-01-28 12:00:35 +01:00
teoxoy
d17a98fbc0
add function that parses variable, value, func call and variable updating statements
2026-01-28 12:00:35 +01:00
teoxoy
6ad9343861
flatten match
2026-01-28 12:00:35 +01:00
teoxoy
d52a9db5d1
use lexer.next() instead of peek() for most statements
2026-01-28 12:00:35 +01:00
teoxoy
5ab172cfba
rename function_call_or_assignment_statement to func_call_or_variable_updating_statement
2026-01-28 12:00:35 +01:00
teoxoy
6a7cc4be93
rename function_statement to func_call_statement
2026-01-28 12:00:35 +01:00
teoxoy
f826c16593
remove lexer.clone()
2026-01-28 12:00:35 +01:00
teoxoy
3c797dee68
rename postfix to component_or_swizzle_specifier
2026-01-28 12:00:35 +01:00
teoxoy
7d653d9c08
update lhs_expression to be in line with the spec
2026-01-28 12:00:35 +01:00
teoxoy
630e27a188
remove peek_ident_with_span
2026-01-28 12:00:35 +01:00
teoxoy
21972dd38f
remove next_scalar_generic
2026-01-28 12:00:35 +01:00
teoxoy
6bcf0f2d28
rename general_expression to expression
2026-01-28 12:00:35 +01:00
teoxoy
8f49329f3c
rename assignment_statement to variable_updating_statement
2026-01-28 12:00:35 +01:00
teoxoy
fb3ce224c1
[wgsl] rename type_decl to type_specifier
2026-01-28 12:00:35 +01:00
teoxoy
df60dd008c
add optionally_typed_ident fn
2026-01-28 12:00:35 +01:00
Andy Leiserson
0e558f27ef
fix(naga): Support dual-source blending for SPIR-V shaders ( #8865 )
2026-01-28 09:19:57 +01:00