9481 Commits

Author SHA1 Message Date
Jim Blandy
5304c3ca4a [naga wgsl-in] Apply automatic conversions to sampling arguments.
Properly apply WGSL's automatic conversions to the arguments
to texture sampling functions.

Introduce helper function `Lowerer::expression_with_leaf_scalar`.

Although this can't affect behavior, use
`Lowerer::expression_for_abstract` for the `image` and `sampler`
arguments, simply because we want to move away from
`Lower::expression`'s automatic concretization, and move towards
having callers say explicitly what sort of conversions they need.

Although this can't affect behavior, use
`Lowerer::expression_with_leaf_scalar` for the `offset` argument, so
that the code spells out that this requires an `i32` value, rather
than depending on blind concretization giving it that.

Continue to use `Lowerer::expression` for `gather` and `array_index`,
since those happen to behave correctly with blind concretization, and
can be cleaned up later.

Fixes #7427.
2025-04-18 11:56:34 -07:00
Jim Blandy
6cd6561884 [naga wgsl-in] Minor cleanup to Lowerer::texture_sample_helper.
Use deferred initialization instead of building tuples, so that match
arms can provide values by name, not by position within a tuple.
2025-04-18 11:56:34 -07:00
Erich Gubler
f739f8e885
chore: add config. for prettier (#7560) 2025-04-18 11:13:02 -04:00
Ebbe Steenhoudt
7cab1747ee
Loosen Viewport validation requirements to match the new specs (#7564) 2025-04-18 15:17:53 +02:00
sagudev
bbff2c4e0b
use wgt::PollType<u64> in device interface instead of wgt::PollType<SubmissionIndex> (#7562) 2025-04-17 18:29:11 -04:00
Kaur Kuut
205e464849
Fix CHANGELOG.md link mishap. (#7563) 2025-04-17 12:26:57 -04:00
Teodor Tanasoaia
6ea7962da7
[d3d12] remove the need for dxil.dll (#7566) 2025-04-17 16:21:36 +02:00
Erich Gubler
c7330a8b49
style(naga): add whitespace b/w items in naga::error (#7558) 2025-04-17 00:47:33 -04:00
Erich Gubler
2f409a8551
Add .jj to .gitignore (#7559) 2025-04-17 00:46:54 -04:00
Erich Gubler
c24bf0f56f
chore(CHANGELOG): run prettier (#7556) 2025-04-16 22:34:13 -04:00
Erich Gubler
65c06c2b21 feat(naga): add pack4x{I,U}8Clamp built-ins 2025-04-16 15:07:11 -04:00
Erich Gubler
2aa8a830fb refactor(msl-out): Pack4x{I,U}8: make was_signed use `matches!(…) 2025-04-16 15:07:11 -04:00
Erich Gubler
97c30046bc refactor(glsl-out): Pack4x{I,U}8: make was_signed use `matches!(…) 2025-04-16 15:07:11 -04:00
Erich Gubler
bb12f6287f refactor(naga): factor out write_arg 2025-04-16 15:07:11 -04:00
Connor Fitzgerald
628e4cfcf5 Update DXC 2025-04-16 15:02:42 -04:00
Connor Fitzgerald
defca6ee35 Ensure raytracing tests run on slightly downlevel adapters 2025-04-16 15:02:42 -04:00
Connor Fitzgerald
6efeae98dd Fix path to images on ray_cube_normals test 2025-04-16 15:02:42 -04:00
Connor Fitzgerald
0e898baa8d Fix skybox example parameters 2025-04-16 15:02:42 -04:00
Connor Fitzgerald
146018cf6e Update VulkanSDK to 1.4.309 2025-04-16 15:02:42 -04:00
Connor Fitzgerald
1f6a21c5e6 Remove unneeded file 2025-04-16 15:02:42 -04:00
Teodor Tanasoaia
ae3241f352
add changelog entries (#7551) 2025-04-16 15:47:01 +00:00
Jim Blandy
fd4eb67877 [naga wgsl-in] Try out new use convention.
Change `naga::front::wgsl::lower` to `use` `ir` and `proc`,
and then qualify identifiers with that instead of `crate`.

This is strictly fiddling with `use` directives and name
qualification, with the concomitant formatting changes; there should
be no change to the module's behavior or meaning.
2025-04-16 08:25:14 -07:00
bernhl
06ee718ddd
[naga] Allow Scalar for MathFunction::Distance (#7530)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2025-04-16 08:24:32 -07:00
Andy Leiserson
09178f2400
[naga] Track globals used directly by a named expression (#7540) 2025-04-15 15:01:19 -04:00
Teodor Tanasoaia
ffc920b9ae
[hlsl-out] error on unimplemented non-struct push constants (#7545) 2025-04-15 17:12:28 +00:00
teoxoy
62d4e82149 [example] ray_cube_shadows: wrap push constant in a struct
We are aware of this issue, I don't know why the example doesn't fail on trunk though...
2025-04-15 17:56:17 +02:00
teoxoy
edbadd2b99 expand on InstanceFlags::VALIDATION_INDIRECT_CALL docs 2025-04-15 17:56:17 +02:00
teoxoy
45d78e2fb4 remove DownlevelFlags::VERTEX_AND_INSTANCE_INDEX_RESPECTS_RESPECTIVE_FIRST_VALUE_IN_INDIRECT_DRAW 2025-04-15 17:56:17 +02:00
teoxoy
597114052e [d3d12] get vertex_index & instance_index builtins working for indirect draws 2025-04-15 17:56:17 +02:00
Teodor Tanasoaia
3805768cb4
[naga] mark readonly_and_readwrite_storage_textures & packed_4x8_integer_dot_product language extensions as implemented (#7543) 2025-04-15 09:30:56 -04:00
Teodor Tanasoaia
78d05f5f71
[core] check that indirect buffers have not been destroyed (#7534) 2025-04-14 11:06:32 -04:00
Kevin Reid
8a27fabc78
Fix raw-window-handle dependency being too lenient (#7526) 2025-04-12 22:21:57 -04:00
Jim Blandy
936aa4d9dc
[naga xtask] Update Cargo.lock. (#7522) 2025-04-11 17:55:42 -04:00
Connor Fitzgerald
303b0db00e Update release checklist 2025-04-11 15:18:28 -04:00
Connor Fitzgerald
700f235378 Update changelog for 25.0.1
# Conflicts:
#	CHANGELOG.md
2025-04-11 15:18:28 -04:00
Connor Fitzgerald
f1c496523f
[d3d12] Fix bug with committed resource allocation (#7519) 2025-04-11 18:18:43 +00:00
Connor Fitzgerald
e45013645f
[naga] Use racy::OnceBox for Namer::default (#7517) 2025-04-11 14:12:25 -04:00
Connor Fitzgerald
27115f7d57
Add bindless support to changelog (#7516) 2025-04-11 17:39:16 +00:00
Robert Bamler
7a66927460 Const eval of dot4I8Packed and dot4U8Packed
Prompted by rebasing on #7487.
2025-04-11 13:32:10 +02:00
Robert Bamler
c7d0af156d Implement dot4I8Packed and dot4U8Packed
Closes #7481.

This implementation roughly follows approach 2 outlined in #7481, i.e.,
it adds a polyfill for the signed and unsigned dot product of packed
vectors for each platform. It doesn't use the specialized instructions
that are available for this operation on SPIR-V (with capability
DotProductInput4x8BitPacked).
2025-04-11 13:32:10 +02:00
Vecvec
65c56fdee4
[spv-out] Prevent ray intersection functions overwriting each other. (#7497) 2025-04-11 11:18:45 +02:00
Jim Blandy
22c4033cb3 [naga] Properly evaluate abs(most negative abstract int).
Have constant evaluator use `wrapping_abs` instead of `abs` when
applying `MathFunction::Abs` to AbstractInt values. WGSL says that
applying `abs` to the most negative AbstractInt value must return it
unchanged, which is what Rust's `i64::wrapping_abs` does.
2025-04-10 22:59:22 -04:00
Connor Fitzgerald
e5a2e440b2 Add f16 to changelog 2025-04-10 20:41:28 -04:00
Connor Fitzgerald
47bc85f884 Update release-checklist.md 2025-04-10 20:41:28 -04:00
Connor Fitzgerald
45d8f42513 Use workspace package information everywhere 2025-04-10 20:41:28 -04:00
Bruce Mitchener
dde9422114
Fix build with profiling enabled (#7509) 2025-04-11 00:34:05 +00:00
Bruce Mitchener
fec411cf2d
Remove MaintainBase (#7508) 2025-04-10 15:09:29 -04:00
Bruce Mitchener
3081c4f094
Fix typos (#7510) 2025-04-10 15:09:03 -04:00
Andy Leiserson
2a2c851c40 [naga] Two structs with the same members are not equivalent
Fixes #5796
2025-04-10 19:11:56 +02:00
Andy Leiserson
19429a1dc9 [naga] Refactor BlockContext type resolution methods
Change `resolve_type` and `resolve_type_impl` to return
`TypeResolution`s. Add a new method `resolve_type_inner` that returns a
`TypeInner` (i.e. what `resolve_type` used to do).
2025-04-10 19:11:56 +02:00