Commit Graph
515 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
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
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
Abir Deol e084b66aab [naga spv-out] Declare LocalInvocationIndex once in mesh entry points (#10497) 2026-10-18 19:01:10 +00:00
Yilmaz Kiymaz 7f29aa4b57 [naga spv-in] Accept a signed integer ViewIndex input (#10568) 2026-10-16 13:29:15 +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
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
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
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
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
JMS55 e9a873e5d2 [SPIR-V out] Correctly lower instance_index in raytracing shaders (#10154) 2026-08-29 14:24:11 +12:00
JMS55 a49c1e1e1d [SPIR-V out] Handle primitive_index in mesh and raytracing shaders (#10153) 2026-08-28 17:34:46 -04:00
Erich Gubler f28f1bf49f fix(naga): reject @location(…)s for input in compute shaders 2026-08-19 20:04:16 +02:00
Erich Gubler 468e9da9a5 fix(naga): disallow result types in compute shaders 2026-08-19 20:04:16 +02:00
Emil Ernerfeldt a6caee7084 Gate @interpolate(linear) behind a downlevel flag (#9972) 2026-08-16 12:11:15 +00:00
Erich Gubler cdc9d0c4dd fix(glsl-out): avoid accidental predecrement in atomicSub negation (#9924) 2026-08-04 09:41:42 +00:00
Jim Blandy c2d5fa49da [naga] Test validation of function/entry point name collision.
Unlike WGSL, Naga IR permits functions to have conflicting names, and
entry points must only have distinct names if they are for the same
shader stage. Document and test this.
2026-08-03 08:22:34 -07:00
c079e55f53 fix: emit dimension-correct HLSL texture sample offsets (#9951)
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-07-30 12:58:50 +00:00
Nazar Mokrynskyi fb1c777b2f naga: fix panic parsing SPIR-V subgroup reduce/scan/ballot ops 2026-07-29 18:01:48 -07:00
Jim BlandyandClaude Sonnet 5 f892b2e235 spv-out: don't dynamically index PushConstant vectors with OpAccessChain
Per VUID-RuntimeSpirv-None-04745, all accesses into a PushConstant-storage-class
variable that are arrays must use dynamically uniform indices; this restriction
also applies to vectors. Naga was emitting `OpAccessChain` with per-invocation
(non-uniform) indices directly into push-constant vectors, which is undefined
behavior under that rule -- observed on RADV as every invocation silently
reading element 0 of the vector.

Add a special case to `write_checked_load`, alongside the existing matCx2
ones, that loads the whole vector and uses `OpVectorExtractDynamic` instead,
which isn't subject to the restriction.

Fixes gfx-rs/wgpu#8612.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 12:05:24 -07:00
Andy Leiserson b2be758b64 fix(naga spv-out): Sanitize debug strings (#9904) 2026-07-20 20:41:22 +00:00
Luo Zhihao 77c17d24b0 Fix required immediate slots calculation and panics when slots overflow (#9725) 2026-07-20 12:06:14 -07:00
Jeffrey Vo de9f9f4de8 fix(naga msl-out): Support sampler lod_clamp & max_anisotropy (#9842) 2026-07-16 12:21:07 -04:00
Luo Zhihao d056b0e025 Validate pipeline layout immediate_size and fix its calculation when there are multiple immediate variables (#9711) 2026-07-14 09:47:17 -07:00