Commit Graph
1523 Commits
Author SHA1 Message Date
Andy Leiserson f76801d8c1 fix(metal): Check respondsToSelector before feature detection calls (#9284)
These methods are not implemented by `CaptureMTLDevice`. The actual
calls succeed, because the exception is caught and handled by a
fallback mechanism, but the valid-method checks by objc2 in debug
builds are not aware of the fallback and panic.

Fixes #9282
2026-03-23 10:38:33 -07:00
Erich Gubler 3c13b5e68c fix(metal): unconditionally enable CLIP_DISTANCES 2026-03-20 10:58:29 -06:00
Connor Fitzgerald 2810e95489 Update to winit 0.30 (#9089) 2026-03-18 20:34:12 +01:00
Bruce Mitchener 824211333d metal: use setMeshBytes for mesh shader immediates (#9254)
Other mesh-stage byte bindings already use `setMeshBytes`, but the
immediates path still used `setObjectBytes`. Switch that call
site to the mesh-stage encoder entry point.
2026-03-18 09:33:15 -04:00
Bruce Mitchener 66c4c30bdc metal: use typed objc2 pipeline creation APIs (#9253)
Fixes #8944
2026-03-18 09:25:07 -04:00
Connor Fitzgerald f59124f3f6 Add support for the D3D12 Agility SDK (#9130) 2026-03-16 20:43:32 -04:00
Bruce MitchenerandAndy Leiserson 28bda54ae0 metal: prevent command buffer exhaustion deadlocks (#8574)
- Track outstanding Metal command buffers per queue and gate begin_encoding against the hard MAX_COMMAND_BUFFERS, returning device-lost with an actionable warning instead of letting new_command_buffer hang when encoders are leaked.
- Share the counter across queue/encoders and decrement on submit or discard after clearing the raw command buffer so drop happens before the bookkeeping update.

Fixes #3084, #8047.

---------

Co-authored-by: Andy Leiserson <aleiserson@mozilla.com>
2026-03-16 15:44:12 -07:00
OpsticandAndreas Reich e682ce3f29 Enable use of GL_EXT_multisampled_render_to_texture extension for OpenGL backend (#8536)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2026-03-15 20:08:08 +00:00
Niklas EickerandConnor Fitzgerald 62c2f5da97 Move ordered usages to hals (#8924)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-03-15 03:23:32 +00:00
Andy Leiserson 3899edce8c refactor(metal): MTLCommandQueue is thread-safe (#9217) 2026-03-14 22:31:57 -04:00
Vecvec 50a4eaa75c [vulkan] Offset AccelerationStructureGeometryTrianglesDataKHR::vertex_data instead of using first_vertex (#9220) 2026-03-14 22:30:09 -04:00
John TurandConrad Irwin e66813a88e Fix OpenGL robustness fallback when the robustness extension is unsupported (#9153)
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2026-03-14 22:29:14 -04:00
atlv ac62b9abed Add MTL Version3_2 (#9223) 2026-03-14 23:10:19 +00:00
Andy Leiserson ca3239e689 chore!: Move PRIMITIVE_INDEX feature into the WebGPU group (#9101)
Enable relevant CTS tests.
2026-03-13 13:52:14 -07:00
teoxoy 83c906f99f [hal] add missing WebGPU adapter capability guarantees 2026-03-13 16:24:43 +01:00
teoxoy c81c9783c5 [metal] don't store adapter limits
Fixes #8715.
2026-03-13 16:24:43 +01:00
teoxoy 1cce93aa28 [d3d12] account for our usage of SRVs & UAVs when calculating per-stage
limits
2026-03-13 16:24:43 +01:00
teoxoy b234c2f5c8 [d3d12] add ResourceBindingTier enum 2026-03-13 16:24:43 +01:00
teoxoy a22e43991c [vk] take into account maxDescriptorSet* limits when computing
per-stage limits
2026-03-13 16:24:43 +01:00
teoxoy 990e12ebbc [wgpu-hal] report accurate maxBindingsPerBindGroup limits 2026-03-13 16:24:43 +01:00
teoxoy 3d637fa78d [vk] lower relevant per stage limits to stay under Vulkan's
`maxPerSetDescriptors` limit
2026-03-13 16:24:43 +01:00
teoxoy 59eb0ee70c use cap_limits_to_be_under_the_sum_limit to clamp per-stage limits 2026-03-13 16:24:43 +01:00
teoxoy 3f90204744 [vk] lower relevant per stage limits to stay under Vulkan's
`maxPerStageResources` limit

Fixes #9151.
2026-03-13 16:24:43 +01:00
teoxoy 085fd3c565 [vk] consult maxMemoryAllocationSize & maxBufferSize
Fixes #3326.
2026-03-13 16:24:43 +01:00
teoxoy c819484751 [metal] fix limits
Fixes #8173.
2026-03-13 16:24:43 +01:00
teoxoy f06431f6de [vk] fix limits 2026-03-13 16:24:43 +01:00
teoxoy 2b8fa47f5f [d3d12] fix limits
Resolves #3333.
2026-03-13 16:24:43 +01:00
atlv c4c623fb45 wgpu-naga-bridge (#9201) 2026-03-13 11:09:12 -04:00
atlv 9ed77372b4 Add coherent and volatile memory decorations for storage buffers. (#9168) 2026-03-11 19:53:52 -04:00
Dzmitry Malyshau adc3534f1c Add max_binding_array_acceleration_structure_elements_per_shader_stage limit 2026-03-11 08:18:38 -07:00
Dzmitry Malyshau e39b3aec8e Plumbing and a test for ACCELERATION_STRUCTURE_BINDING_ARRAY 2026-03-11 08:18:38 -07:00
Marijn Suijten 35db26b2c6 Make HasDisplayHandle optional in WindowHandle (#8782) 2026-03-10 11:36:12 -04:00
Erich Gubler a18abddd33 refactor: use From or Into for u32 -> u64 casts 2026-03-09 16:49:06 -06:00
Erich Gubler fbc0388b61 refactor: DRY for i32::MAX in wgpu_hal::noop::CAPABILITIES 2026-03-09 16:49:06 -06:00
Genna Wingert ce7dad3026 fix: Change type of max_*_buffer_binding_size to follow spec 2026-03-09 16:49:06 -06:00
Emil Ernerfeldt 12b9d4996b macOS: Fix one-second delay when switching a wgpu app to the foreground (#9141) 2026-03-08 23:17:13 +01:00
John Tur 74baec71b4 Support SSBOs and compute shaders when provided through GL extensions (#9169) 2026-03-07 21:17:12 -05:00
Andy Leiserson 7a17f66aa5 Tweak some limit reporting (#9118)
* Dummy implementation of max_storage_{buffers,textures}_in_*_stage limits

* hal(vulkan, dx12): Clamp per-stage binding limits at max_bindings_per_bind_group - 1

* Update CHANGELOG

* Allocate per-stage limits out of max_bindings_per_bind_group

* Fix typo and adjust hal's `log` dependency
2026-03-04 18:39:47 +01:00
Mikołaj Radkowski 665cb34e32 Fix multi-planar texture copying (#9069) 2026-03-01 12:14:03 +01:00
Teodor Tanasoaia e114d2f0a7 Add support for gaps in bind group layouts & update relevant validation (#9034)
* [wgpu-core] add support for optional BG & BGL entries

* [wgpu] allow gaps in bind group layouts

And allow unbinding in the web backend.

* adapt tests

* add changelog entry

* [wgpu] remove generic from `PipelineLayoutDescriptor`
2026-02-25 19:47:36 +01:00
Andy Leiserson b09a919c6a DepthStencilState validation fixes (#8840)
* Make `depth_compare` and `depth_write_enabled` optional

These fields are optional in the WebGPU API. Having them optional in the
wgpu API as well keeps validation logic centralized in wgpu-core.

Fixes #8830

* Remove `DepthStencilStateIdl`
2026-02-25 14:59:48 +01:00
Andy LeisersonandErich Gubler 3dfa9af0db Enable FLOAT32_BLENDABLE on Metal, in Deno, and separate from filtering (#9032)
---------
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2026-02-24 14:52:34 -08:00
Luo Zhihao 6432094c9e GLES: Set DownlevelFlags::CUBE_ARRAY_TEXTURES correctly (#9088) 2026-02-22 10:01:57 +01:00
Erich Gubler 7705c84485 fix(d12): fix startup crash for shader models 6.8, 6.9 (#9083) 2026-02-21 04:37:22 +00:00
Inner Daemons c7f3db8bf1 Remove dispatch2 dependency (#9048) 2026-02-18 16:55:20 -08:00
Inner Daemons 8f50bb9d98 Make passthrough shaders non-experimental (#9054)
* Refactored passthrough shaders

* Added a changelog entry
2026-02-18 12:29:50 -05:00
Alexander Meißner 05861da365 [hal metal] ray tracing acceleration structures (#8071)
* Fixes index_buffer label in ray_traced_triangle example.

* Fixes min_push_constant_size in ray_shadows example.

* Ensures there always is Some() buffer reference, even for get_acceleration_structure_build_sizes().

* Updates CHANGELOG.

* Adds feature detection.

* Adds Capabilities Limits.

* Adds necessary objc2-metal features in Cargo.toml

* Sets raw_tlas_instance_size.

* Sets ray_tracing_scratch_buffer_alignment.

* Adds conv::map_index_format().

* Adds conv::map_acceleration_structure_descriptor().

* Implements AccelerationStructure.

* Implements resource binding.

squash with "Implements resource binding."

* Adds CommandState::acceleration_structure_builder.

* Implements CommandEncoder::copy_acceleration_structure_to_acceleration_structure().

* Implements CommandEncoder::build_acceleration_structures().

* Implements CommandEncoder::place_acceleration_structure_barrier().

* Implements CommandEncoder::read_acceleration_structure_compact_size().

* Implements Device::get_acceleration_structure_build_sizes().

* Implements Device::get_acceleration_structure_device_address().

* Implements Device::create_acceleration_structure().

* Implements Device::destroy_acceleration_structure().

* Implements Device::tlas_instance_to_bytes().

* Adds CommandEncoder::set_acceleration_structure_dependencies().

* Review feedback
2026-02-19 06:21:11 +13:00
Connor Fitzgerald 26c5618d83 Fix CRLF in dxgi.rs (#9067) 2026-02-17 09:22:14 -05:00
Inner Daemons 43a88474f4 Fixed clippy lint in CI (#9050) 2026-02-13 16:21:31 -08: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