Commit Graph
1229 Commits
Author SHA1 Message Date
JMS55andConnor Fitzgerald b672a54004 [naga] HitObject support (#10311)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-11-06 21:52:20 +00:00
DonutShinobuandConnor Fitzgerald 70b294409d [naga hlsl] Initialize compute workgroup arrays with distributed loops (#10314)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-11-06 21:06:50 +00:00
Tom SchusterandConnor Fitzgerald 2bd544d896 Verify debugPrintf specifiers (#9641)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-11-05 22:39:11 +00:00
VecvecandConnor Fitzgerald 9e744954f7 [wgpu-core] Ray tracing pipelines (#10144)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-11-05 19:20:32 +00:00
Erich Gubler 2a1968fb46 style: double newline above TemplateListIter::maybe_address_space 2026-11-05 17:24:14 +00:00
Islam Abdymazhit 66d5a64f2e fix(hlsl-out): pass 1/w in fragment @builtin(position).w (#10733) 2026-11-04 17:27:34 +00:00
szymros dcf21900e5 [naga] Disallow usage of ray_query as a binding (#10832) 2026-11-04 14:11:14 +00:00
Douglas Dwyer 97474455ba [naga] Implement vec2<f16> ↔ u32 bitcasts (#10613) 2026-10-31 10:05:54 +00:00
Douglas DwyerandTeodor Tanasoaia 9f3690208d fix(hlsl-out) std430 layout for HLSL immediate/push constant buffers (#10581)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2026-10-31 10:01:09 +00:00
Douglas Dwyer eaf2219254 feat(dx12, hlsl-out) Support for SHADER_EARLY_DEPTH_TEST on DX12 (only non-MSAA framebuffers) (#10624) 2026-10-31 09:55:07 +00:00
Douglas Dwyer 2375b1cd83 feat(metal, msl-out) Support for SHADER_EARLY_DEPTH_TEST on Metal (#10625) 2026-10-30 17:22:35 +00:00
Ilyas Mallah 14231a863b [naga glsl-out] Cast u32 image levels and sample indices to int in bounds checks (#10704) 2026-10-30 16:58:52 +00:00
Erich Gubler 118b25a4c4 style: replace CRLF from #10459 w/ LF (#10782) 2026-10-30 15:54:56 +00:00
Andy Leiserson 49325ca0a1 feat(vulkan): External texture binding support (#10768) 2026-10-29 12:23:17 +00:00
Erich GublerandAndy Leiserson c963c0b0af fix(msl-out): select gradient constructor by image dimension (#10573)
Co-authored-by: Andy Leiserson <aleiserson@mozilla.com>
2026-10-27 14:51:53 +00:00
teoxoy 5dfcef2ade [naga] add name_reuse test case 2026-10-27 11:30:28 +00:00
teoxoy 2b206a0321 [msl] Hoist body temporaries used by continuing blocks
The MSL backend emits a loop's `continuing` block at the top of the
`while` loop, above the body. Values the body computed and `continuing`
referenced were then either re-evaluated in place, reading whatever
state the body had left behind, or, for statement results such as call
results, hit an `unreachable!` panic.

Now, when a loop has a `continuing` block or `break_if`, the
temporaries it needs from the body are declared ahead of the loop, and
the body assigns to them instead of declaring them.
2026-10-27 11:30:28 +00:00
teoxoy f788839ec1 [naga] add loop continuing block tests 2026-10-27 11:30:28 +00:00
teoxoy f0c49fbe8e [msl] use expression index as name for statement results in remaining
places
2026-10-27 11:30:28 +00:00
Jim Blandy ad5a70aea1 [core] Validate shader stages after applying pipeline overrides.
The WebGPU specification requires pipeline creation to validate
properties of shader stages, like workgroup sizes, that may depend on
the values of pipeline-overridable constants. Previously, wgpu-core
validated stages using an `Interface` built from the module before
overrides were applied, with results contrary to spec. Override
processing was then carried out by `wgpu_hal`, after all validation
had supposedly been taken care of.

This commit has `create_shader_module` save the validated Naga module
instead of creating a `wgpu_hal` shader module. At pipeline creation
time, `StageCompiler::compile` now applies the stage's override values
with `process_overrides`, validates the stage using an `Interface`
built from the result, and, if that validation succeeds, returns a
`CompiledStage` holding the `wgpu_hal` `ShaderModule` created from it.
Dropping the `CompiledStage` destroys that module once the pipeline
has been created.

Since the override values have already been applied, we pass
`wgpu_hal` empty sets of constants for these modules.

Since the `naga::back::pipeline_constants` module is now used by
`wgpu_core` rather than `wgpu_hal` backends, it can't be conditionally
available based on Naga's backend features. Include it
unconditionally.

This change removes `Interface::finalize_entry_point_name`, since we
no longer build an `Interface` at shader module creation. Instead, we
choose entry points from the `naga::Module` directly.

Add new tests: `tests/tests/wgpu-validation/api/overrides.rs`

Fixes #9774.
2026-10-26 23:42:33 +00:00
Abir Deol e084b66aab [naga spv-out] Declare LocalInvocationIndex once in mesh entry points (#10497) 2026-10-18 19:01:10 +00:00
Ilyas Mallah 304a72dca8 naga: Fix build with only arbitrary feature (used for fuzzing) (#10637) 2026-10-17 00:12:27 +00:00
Yilmaz Kiymaz 7f29aa4b57 [naga spv-in] Accept a signed integer ViewIndex input (#10568) 2026-10-16 13:29:15 +00:00
Kevin Reid 60036cdc0a Fix Cargo lint from Rust 1.100 (#10576) 2026-10-14 00:35:08 +00:00
Andy Leiserson eb4678dd08 refactor(naga): Expose indices of ExternalTextureParams members 2026-10-13 19:34:06 +00:00
Andy Leiserson 0ce78c5d0c refactor(naga): Create TypeInner::is_external_image helper 2026-10-13 19:34:06 +00:00
Kevin Reid 20a17523e2 Fix Clippy lint from Rust versions newer than 1.96 (#10575) 2026-10-13 17:06:07 +00:00
Erich Gubler 5422372917 fix(spv-out): panic if instruction word count > u16::MAX in Instruction::to_words (#10537) 2026-10-12 20:05:50 +00:00
Younes BerianeandErich Gubler 03017a1aba [naga wgsl-in] Reject loads of types that contain atomics (#10458)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-10-07 21:06:23 +00:00
Erich Gubler ae19a4708b fix(hlsl-out): cast float types back from sign's output 2026-10-05 12:08:36 +00:00
Erich Gubler 24cee9e495 test(naga): add runtime_{f,i}32 to math-functions' sign cvg. 2026-10-05 12:08:36 +00:00
Erich Gubler 3a227342f2 test(naga): add float-sign snapshot 2026-10-05 12:08:36 +00:00
FerdonandFerdon 5a7601baf4 Reject unsigned inputs to sign (#10451)
Co-authored-by: Ferdon <notferdon@users.noreply.github.com>
2026-09-28 05:18:12 +00:00
Jim Blandy d8548d5991 [naga] Include path in HLSL validation error messages. (#10404) 2026-09-25 05:12:39 +00:00
Erich GublerandAndy Leiserson b8bfc58e81 fix(const_eval): handle non-vector Compose select args. (#10350)
Co-authored-by: Andy Leiserson <aleiserson@mozilla.com>
2026-09-23 10:04:22 +00:00
MinerSheepandTeodor Tanasoaia 103a70e581 [naga] const_evaluator: insertBits, extractBits, faceForward, reflect, and refract (#10258)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2026-09-22 20:17:45 +00:00
Connor Fitzgerald 35332d2114 Update agent tooling (#10202) 2026-09-18 15:06:10 +00:00
sagudev a072eea89d Move language_extension into naga-types
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-17 10:45:20 +00:00
f365d54803 implement debugPrintf in msl & spv (#9389)
Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-09-15 18:49:35 +00:00
renovate[bot]andConnor Fitzgerald 7dcf5c1820 Update Rust to 1.95 (#10207)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-09-15 16:52:45 +00:00
Atirna 8ef593b61d Fix doc_comments struct_member indices for undocumented members (#10273) 2026-09-14 08:07:06 -04:00
Andy Leiserson 10fe6409d4 Partial snorm10-10-10-2 vertex format support (#10226) 2026-09-11 10:53:31 -04:00
Andy Leiserson aed6771a20 fix(naga): Fix compilation error when glsl-in enabled in isolation (#10297) 2026-09-09 16:00:02 +00:00
Emil Ernerfeldt 9fa0644916 [wgsl-in] Better WGSL error reporting (#9973) 2026-09-05 19:50:59 +02:00
JMS55 dd5c40b474 Support raytracing barycentrics for spirv, and fix spirv 1.4 handling for mesh and raytracing shaders (#10193) 2026-09-04 20:58:29 +00:00
Luo Zhihao 8c1b137be2 Disallow array types in var<immediate> (#10081) 2026-09-02 14:25:31 +00:00
Connor Fitzgerald 9dfc677068 Unbreak trunk: zizmor permissions and stale WGSL snapshots (#10235) 2026-09-01 10:50:23 -07:00
Nazar Mokrynskyi bd54ab2c0e naga: don't emit trailing whitespace after own-line WGSL attributes (#10131) 2026-09-01 06:07:47 -04:00
Connor Fitzgerald 7bcd2125ff ci: Update Vulkan SDK to 1.4.357 (#10213) 2026-08-31 23:57:44 -04:00
Vecvec ef0a0a230f Prevent ray queries hoisted out of loops from generating invalid code (#9945) 2026-08-29 17:32:42 -04:00