Commit Graph
2638 Commits
Author SHA1 Message Date
sagudev 80e59f179f less in wgpu
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-10-08 11:08:30 +00:00
sagudev 928b9d10ae better safety on BufferMapping
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-10-08 11:08:30 +00:00
sagudev 33f33e3d73 change map state on unmap even on destroyed device
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-10-08 11:08:30 +00:00
sagudev f4455f178d get_mapped_range return Mapping which holds the BufferState lock
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-10-08 11:08:30 +00:00
Connor Fitzgerald f0a620a195 typo fix (#10541) 2026-10-07 18:41:27 +00:00
Connor Fitzgerald 475507a24f typo fix (#10540) 2026-10-05 16:49:16 +00:00
superroket169 7b38991c62 test: move tests of the small crates into #[cfg(test)] modules (#10467) 2026-10-05 16:00:14 +00:00
Erich GublerandNazar Mokrynskyi cc706f714a refactor: wgpu{,-core}: remove recursion_limit attrs.
Now that we force the compiler to eagerly evaluate `Send + Sync` for
types that have had problems with `recursion_limit`s, we should be able
to use the compiler's defaults. Remove the attributes raising the
default.

Co-authored-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
2026-10-05 15:05:01 +00:00
Connor Fitzgerald 8d16ec493b fix(core): implement Send and Sync for Device manually
Every resource holds an `Arc<Device>`, so evaluating their auto traits
used to walk all of `Device`. This exceeded the default recursion limit
on nightly for `wgpu::CoreCommandEncoder`.
2026-10-05 15:05:01 +00:00
Stuart Parmenter 79348d63e6 Use separate Vulkan memory pool for TRANSIENT buffers (#10232) 2026-10-02 21:25:28 +00:00
Sam fcd059f423 Move MapMode into wgpu-types and use it instead of HostMap in wgpu-core (#10474)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-28 11:15:27 +00:00
sagudev 251badd212 TextureView::{as, from}_core
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-27 06:46:29 +00:00
Alex Andreba 67299ee4a6 Added an InstanceBuilder to wgpu_core (#10204) 2026-09-27 05:54:39 +00:00
Sam 6293e039ca [core] "consume" adapter on first succesful request_device if STRICT_WEBGPU_COMPLIANCE (#10444)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-24 13:34:16 +00:00
Patrik NilssonandConnor Fitzgerald 3ea8d8c6ef perf(core): Inline small bind group descriptor storage (#10188)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-09-24 05:54:36 +00:00
Sam 0ea906f074 Fix lock rank graph for SURFACE_PRESENTATION (#10426)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-23 16:39:13 +00:00
Jim Blandy 323acfb729 [core] Documentation tweaks for Varying, StageIo. 2026-09-22 08:51:48 +00:00
Jim Blandy dd5022ba2d [core] Add whitespace to CreateShaderModuleError for clarity. 2026-09-22 08:51:48 +00:00
Andy Leiserson c8dc1509b9 Enable wgpu_validate_locks in CI and local debug builds
Fixes #5937
2026-09-18 19:56:30 +00:00
Andy Leiserson b9f7ddad53 Fix lock issues affecting mark_externally_initialized test
- `RwLockReadGuard::forget` was not actually forgetting the
  `LockStateGuard`, resulting in a "double unlock" error when
  `SnatchableResourceGuard` later called `force_unlock_read`.
- Adjust both the test and the lock graph to avoid lock
  rank errors.
2026-09-18 19:56:30 +00:00
Andy Leiserson 468e87264a Lock graph updates 2026-09-18 19:56:30 +00:00
Andy Leiserson 8392a3bc53 Avoid overlapping locks in set_acceleration_structure_dependencies 2026-09-18 19:56:30 +00:00
Andy Leiserson dea6925ee1 Release BLAS_COMPACTION_STATE before acquiring QUEUE_LIFE_TRACKER 2026-09-18 19:56:30 +00:00
Jinlei Li 8630a774af fix(core): Implement render bundle debug commands (#10308) 2026-09-18 12:55:21 +00:00
Erich Gubler 81e38d86f4 fix: emit NeedsInitializedMemory for create_external_texture_binding 2026-09-18 11:04:22 +00:00
Erich GublerandKevin Reid 535f5c67a1 diag: rework sentence structure of MismatchedDynamicOffsetCount
Co-authored-by: Kevin Reid <kpreid@switchb.org>
2026-09-17 15:43:18 +00:00
Erich Gubler 27462da192 diag: use proper conjugation of "to be" for MismatchedDynamicOffsetCount 2026-09-17 15:43:18 +00:00
Erich Gubler 5086e107a2 fix: emit NeedsInitializedMemory for create_external_texture_binding_from_view (#10276) 2026-09-17 11:53:59 +00:00
sagudev d78940969e vendor BindGroupLayoutEntry into wgc and allow specifying more/none binding types
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-17 10:18:50 +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
Sam cddb2f5d80 Ignore timeouts on wasm (#10348)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-15 11:13:53 +00:00
Jinlei LiandConnor Fitzgerald 044e926650 fix(core): Check for device loss before mapping buffers (#10301)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2026-09-15 05:35:02 +00:00
Andy Leiserson 10fe6409d4 Partial snorm10-10-10-2 vertex format support (#10226) 2026-09-11 10:53:31 -04:00
Sam 91fe2f9593 Implement unconfigure in wgc and use it for configure (#10296)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-11 13:46:04 +02:00
Andy Leiserson f3982866be refactor(core): Replace StagingBuffer::write with write_exact 2026-09-08 15:07:15 -07:00
Andy Leiserson fb93139671 feat: Support zero-size vertex and index buffer bindings
Fixes #3170
2026-09-08 15:07:15 -07:00
Andy Leiserson ea0afc6216 refactor: Parameterize type of hal::BufferBinding::size; resolve sizes in core
For storage and uniform buffer bindings, the size is a `wgt::BufferSize`
(`NonZeroU64`). For vertex and index buffer bindings, the size is a 
`wgt::BufferAddress` (regular `u64`).

Temporarily breaks some zero-size vertex/index binding cases that worked
before (end of buffer); will be resolved in an immediate follow-up
commit that fully implements zero-size vertex/index binding support.
2026-09-08 15:07:15 -07:00
Erich Gubler 9920c99c1d feat(core): add Limits::max_storage_{buffers,textures}_in_{vertex,fragment}_stage 2026-09-07 07:02:37 -04: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
AdrianEddy 9d0bc6801f fix(core): hold map_state across the HAL map in Buffer::map (#9959) 2026-09-04 09:35:55 -07:00
Sam c268540bee [core] public *_pipeline_or_error methods return invalid pipeline on lost device (#10260) 2026-09-04 12:53:20 +00:00
sagudevandLuo Zhiaho 8630922f47 Don't include detailed shader compilation info in validation error
Co-authored-by: Luo Zhiaho <luo_zhihao@outlook.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-04 13:38:23 +02:00
sagudev bdea80afac Move error handling of create_shader_module into wgc
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-04 13:38:23 +02:00
sagudev 31f1b0cd81 Move compilation_info into wgc
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-04 13:38:23 +02:00
Andy Leiserson b56be0cf55 fix(core): Drop internals of Device in the correct order (#10243) 2026-09-03 11:11:30 -07:00
Sam 3e11ff59bf Buffer::unmap should not raise any validation errors (#10242)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-02 18:19:05 +00:00
Helgev e6af9e9641 Fix stale poll() doc comments referring to a bool return value
Device::poll (both the public wgpu API and the wgpu-core internal
version), the internal maintain() helper, and Global::device_poll
still described their return value as a plain true/false, left over
from before they returned Result<PollStatus, PollError>. Point readers
at PollStatus/PollError (and UserClosures for maintain's closures)
instead of restating semantics that duplicate their own docs.
2026-09-02 09:31:04 -07:00
Sam 9035f605b7 [core] Log shader translation error and beg for bug reports (#10241)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2026-09-02 15:26:30 +02:00
Andy Leiserson 818586c4d1 fix(core): Clean up resources after failed initialization (#10160) 2026-09-01 14:54:46 -07:00