Commit Graph
327 Commits
Author SHA1 Message Date
Andy Leiserson 4c1ea47ea2 fix(dx12): Fix textureNum{Levels,Layers,Samples} functions (#9542) 2026-05-13 17:51:15 +02:00
Dzmitry Malyshau 1781d73b40 msl: fix cooperative matrix loading semantics (#9451) 2026-05-12 14:20:06 -07:00
teoxoy 786b8b11da [hlsl] handle matCx2<f16> in the uniform address space properly 2026-05-07 20:22:15 +02:00
teoxoy 22720cf121 fix reading from uniform variables of type array<matCx2<T>, N> 2026-05-07 20:22:15 +02:00
JMS55 868eb17098 SHADER_I16 full support (#9412) 2026-04-24 20:49:41 -04:00
Vecvec 56e4a389dd [spv-out] ray tracing pipelines (#9085) 2026-04-20 17:02:49 +02:00
Andy Leiserson b051a87e3e fix(naga): Require explicit flat interpolation for integer shader I/O 2026-04-17 11:50:51 -07:00
Andy Leiserson 75ed5df337 test: Add snapshot test for GLSL interpolation spec 2026-04-17 11:50:51 -07:00
AliandConnor Fitzgerald c040694c94 fixed mat2xc alignment in spv (#9369)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-04-15 20:52:49 +00:00
Vecvec f6d9a1dbaa [msl-out] Switch to intersection queries (#9304) 2026-04-15 16:01:28 -04:00
AliandErich Gubler 51faa6fd87 Implements #8875: Using binding_array should require an enable extension (#9298)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-04-11 04:52:44 +00:00
atlv e6e5f5288c Bring immediate in line with webgpu spec (#9280) 2026-04-09 22:36:02 +00:00
Neel TamtamandConnor Fitzgerald f0201c9cc3 Fix: Polyfill atomic load/store correctly in GLSL/HLSL (#9242) (#9387)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-04-09 01:49:19 +00:00
Inner Daemons 948b1a6c66 Remove unnecessary object data threadgroup barriers in MSL writer (#9396) 2026-04-08 16:05:17 -07:00
Inner DaemonsandAndreas Reich b5bd5aed7d Mesh shaders MSL writer (#8739)
* Single squashed commit

* Updated changelog

* Fixed stupid changelog thing

* If I have to do this one more fucking time I'm gonna lose it

* Removed some pub(super)'s

* Thing

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2026-04-07 17:26:22 +00:00
Ali 74827c4181 Implements #9176 : [[max_total_threads_per_threadgroup]] MSL attribute (#9327)
* Implements #9176 : `[[max_total_threads_per_threadgroup]]` MSL attribute

* introduced `DownlevelFlags::MSL2_1`
2026-04-07 11:40:13 +02:00
Ali c58092266e fixed incorrect packed_int3 conversion generated for Metal (#9355) 2026-04-02 13:29:04 -06:00
e46eda2e4f Full per_vertex implementation (#9219)
* Some stuff worked on

* Works on MSL

* Ready for test 2

* Fix for a thing lol

* Fixed 2 errors

* Fixed DXC

* Add changelog

* Updated CI to hopefully pass on macOS

* Various fixes

* Some final fixes

* CHanged CI

* Update naga/src/front/wgsl/parse/directive/enable_extension.rs

Co-authored-by: atlv <email@atlasdostal.com>

* Thing

---------

Co-authored-by: atlv <email@atlasdostal.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-04-02 05:33:42 +00:00
Ali a071a4d5aa Fixes #9283 : firstLeadingBit returns signed semantics result instead… (#9299)
* Fixes #9283 : firstLeadingBit returns signed semantics result instead of unsigned for u32 input 0xFFFFFFFF on Metal backend

* updates snapshots

* added  to passing tests
2026-03-26 14:46:43 +01:00
Inner Daemons a53ffffe38 Mesh shader HLSL writer (#8752) 2026-03-24 15:42:38 -04:00
Erich Gubler 3c13b5e68c fix(metal): unconditionally enable CLIP_DISTANCES 2026-03-20 10:58:29 -06:00
Andy Leiserson 3cb29686ae refactor(naga): Update IO_SHAREABLE definition 2026-03-18 09:52:01 -07:00
Andy Leiserson 6604345c2e fix(naga msl-out): Fix invalid MSL when vertex data and shader type are both f16 (#9166) 2026-03-16 13:03:58 -06:00
Inner DaemonsandAndreas Reich 96b7872f77 Fix local_invocation_id and local_invocation_index handling (#9099)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2026-03-15 20:25:19 +00:00
Inner Daemons 41f7c288de Added fix and regression test for primitive id on FXC (#9218) 2026-03-13 23:51:03 +01:00
atlv 4e7ffe0938 Workaround Metal driver bug with atomic texture writes (#9185) 2026-03-13 11:01:23 -04:00
atlv 9ed77372b4 Add coherent and volatile memory decorations for storage buffers. (#9168) 2026-03-11 19:53:52 -04:00
ecoricemon eb3bc87b21 fix(naga): Implement constant matrix add/sub/mul (#9162)
* fix(naga): Implement constant matrix operations

Implement binary operations in naga constant evaluator
- multiplication on vector-matrix, matrix-vector, and matrix-matrix
- addition/subtraction on matrix-matrix

* Related CTS
webgpu:shader,validation,expression,matrix,* : 1678/1881 (89.21%) -> 1737/1881 (92.34%)
> remaining fail : overflow/underflow (126), atomic (18)

* naga snapshots updated automatically

* chore: Update naga snapshots
2026-03-10 22:09:00 +01:00
Andy Leiserson ce631c139f fix(naga): Evaluate compound assignment LHS before RHS (#9181) 2026-03-09 23:33:27 +00:00
Andy Leiserson 14ea13f11f fix(naga): Reject matrix negation in WGSL (#9157)
* fix(naga): Reject matrix negation

* Polyfill matrix negation for GLSL
2026-03-05 18:12:37 -05:00
Inner Daemons fdd903e6e4 Add supported caps info to naga backends (#9068)
* Initial commit

* 3/5 done I think

* Updated naga bin to use new caps

* Made clippy shut up

* Tried to fix dota2 validation error

* HLSL list made, also formatted Cargo.toml

* Made stuff work with snapshots

* Added changelog and GLSL list

* Updated message
2026-02-23 06:44:20 -07:00
Vecvec 0bae2959fe Use all ray tracing pipeline builtins (#8998) 2026-02-19 01:56:00 -05:00
Vecvec 157cf36844 [wgsl-out] Ray tracing pipelines (#8970)
* wgsl-out rt pipelines

* Format.

* Enable the ray tracing pipeline extension.

* Add more checks for ray tracing pipelines.

* Changelog.

* Remove ir target.
2026-02-15 15:42:08 -05:00
Inner Daemons 6bca1014b2 Various SPIR-V fixes for mesh shaders (#8756)
* Initial commit adding miscellaneous changes from msl-write and hlsl-write

* Same as previous commit

* Fixed divergence issue

* Removed some unnecessary barriers

* Zero init workgroup memory

* Added limits validation

* Added changelog

* Handled overflow, removed todo

* Lets see if this fixes llvmpipe

* Also this commit fixes llvmpipe maybe

* Unfortunate but not too unexpected at this point

* Updated feature to say to use ShaderRuntimeChecks::unchecked()

* Updated snapshots and took some changes from the hlsl writer

* Snapshots

* 2 quick tweaks

* Updated framework with suggestions by Connor in #8752

* Moved the task runtime limits into naga::back

* Fixed soem stuff

* Fixed checks: >= into >

* Cant believe I forgot this

* Removed code using u64 to check stuff

* Removed thing with limiting it to 2<<21

* Some more work

* Fixed compiles

* Added new field to spv options

* Updated some stuff to pass around the task runtime limits in more ways

* New PR started

* Did another quick fix

* Another quick fix

* Added changelog entry

* Added some explanation docs

* Fixed a warning

* Fixed shader

* Fixed some things & added docs

* Reverted dxc thing

* Fixed thing

* Refactored to TaskDispatchLimits

* Fixed compile error
2026-02-12 14:47:42 -05:00
Inner Daemons 7609ed99e5 Add draw_id builtin (#8883) 2026-02-11 20:47:29 +00:00
Inner Daemons 702c4ef4da [wgsl] gate primitive_index built-in behind its extension & [glsl-out] require extensions for gl_PrimitiveID if needed (#8879) 2026-02-10 12:40:41 +01:00
Mads Marquart b9c09622ce fix(naga): Fix macOS 10.12 nested initializers
The Metal 2.0 compiler (shipped with macOS 10.13 and Xcode 9.0) has
allowed flattening aggregate initializers, but when running on macOS
10.12, we still use the old compiler, so to support that, we need to use
nested initializer lists.
2026-02-01 22:37:52 -08:00
Vecvec 8a37e0f56a [wgsl in and IR] naga ray tracing pipelines (#8570) 2026-01-29 14:18:56 -05: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 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 c20919c5ee [wgsl] update reserved list to latest CR 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
mandryskowski 2ef10891d2 Fix constant evaluation of sign(0.0f) (#8942) 2026-01-27 19:41:10 +00:00
Inner DaemonsandErich Gubler 4d11f5f8de Made traces use .metal extension instead of .msl (#8880)
* Changed msl snapshots to use .metal extension

* Made traces use `.metal` extension instead of `.msl`

* Added changelog entry

---------

Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-01-26 17:25:43 +00:00
Jan eaffaf2024 [glsl-in] fix missing side effects from sequence expressions (#8787) 2026-01-20 13:07:46 +01:00
Andy Leiserson 2d56ec6cdc fix(naga wgsl-out): Emit wgpu_cooperative_matrix extension when needed 2026-01-19 10:38:47 +01:00
Inner Daemons 48ba9812c2 Add support for SPV_KHR_non_semantic_info (#8827)
* Upload

* Added changelog entry

* More comments

* Updated changelog to reflect SUPPORTED_EXT_SETS being removed
2026-01-16 03:06:32 +00:00
Vecvec c97fe3e7c4 [HLSL] Make ray queries safer. (#8763) 2026-01-15 21:35:18 -05:00