Commit Graph

9474 Commits

Author SHA1 Message Date
teoxoy
fc6c529fa8 Adjust DEVICE_DESTROY_THEN_MORE test for spec compliance 2025-07-02 11:11:37 +02:00
teoxoy
487f79ba44 Add missing device validity checks 2025-07-02 11:11:37 +02:00
teoxoy
e10e17907f remove DeviceError::ResourceCreationFailed 2025-07-02 11:11:37 +02:00
teoxoy
918fdc98b5 remove reason from ErrorType::DeviceLost since it's always "unknown" and users should register the lost callback instead 2025-07-02 11:11:37 +02:00
teoxoy
25d75e2a02 remove DeviceError::Invalid, this variant should be the same as DeviceError::Lost 2025-07-02 11:11:37 +02:00
Jim Blandy
2f890eb9b2 [core] Improve assert failure message for id epoch mismatches. (#7871) 2025-07-02 09:33:55 +02:00
Drew Crawford
92cda27b41 Implement on_submitted_work_done (#7864) 2025-07-01 13:21:27 -04:00
Andy Leiserson
86e6b1835b Tolerate destruction of textures used in immediate queue operations prior to submit 2025-06-30 10:29:50 -07:00
Andy Leiserson
26ca28e13c Use env_logger in cts_runner 2025-06-30 10:29:50 -07:00
Erich Gubler
7ff0bd784e fix!: remove WebGpuError impl. for Request{Adapter,Device}Error 2025-06-30 10:58:56 -04:00
Erich Gubler
c7e6170fd0 refactor(deno): use WebGpuError for error classification 2025-06-30 10:58:56 -04:00
Erich Gubler
cc0f4ac4bf refactor(wgpu)!: use WebGpuError for error classification 2025-06-30 10:58:56 -04:00
Erich Gubler
43eee99b29 refactor: extract did_fill_error_scope test helper from did_fail 2025-06-30 10:58:56 -04:00
Erich Gubler
964c5bbf4c feat(core): impl WebGpuError for API errors 2025-06-30 10:58:56 -04:00
Erich Gubler
c8752e5118 feat(types): add error::{ErrorType, WebGpuError} APIs 2025-06-30 10:58:56 -04:00
Erich Gubler
c3922d53d7 docs(types): Make docs. on DeviceLostReason variants less terse 2025-06-30 10:58:56 -04:00
Erich Gubler
d8d1af24b6 refactor(deno): impl From<wgpu_types::DeviceLostReason> for GPUDeviceLostReason 2025-06-30 10:58:56 -04:00
renovate[bot]
d1c40f3c68 Update Cargo.lock (#7866)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 09:36:19 -04:00
Vecvec
27212104f8 Unify debug groups and markers. 2025-06-30 15:00:46 +02:00
Vecvec
6237dbf0b9 Unify timestamp writes. 2025-06-30 15:00:46 +02:00
Vecvec
afa96af76f Unify set push constants. 2025-06-30 15:00:46 +02:00
Vecvec
acd8cb18bb Unify rebinding resources. 2025-06-30 15:00:46 +02:00
Vecvec
4d36a02691 Unify set bind group. 2025-06-30 15:00:46 +02:00
Andy Leiserson
768d5f4879 [metal] Increase MAX_COMMAND_BUFFERS (#7858) 2025-06-27 14:18:40 -04:00
Andy Leiserson
d13e9f5ebf [tests] Test destruction of a used resource before submission (#7853)
* [tests] Test destruction of a used resource before submission

Fixes #5031

---------

Co-authored-by: Nicolas Silva <nical@fastmail.com>
2025-06-27 10:54:19 -07:00
Andy Leiserson
201b2fba76 [deno] Don't report support for native-only features (#7813) 2025-06-27 10:05:13 -07:00
Andy Leiserson
e936c065fc Additional comments on render and compute pass encoding 2025-06-26 15:39:53 -07:00
Andy Leiserson
7722c341e0 Defer destroyed resource errors until cmdbuf submission 2025-06-26 15:39:53 -07:00
Andy Leiserson
41badaedfb Update tests and changelog for deferred error reporting 2025-06-26 15:39:53 -07:00
Andy Leiserson
fc26fbc561 Deferred error reporting for render passes 2025-06-26 15:39:53 -07:00
Andy Leiserson
460f073a67 Deferred error reporting for compute passes 2025-06-26 15:39:53 -07:00
Andy Leiserson
09c08037c9 Add a field in BasePass to store errors 2025-06-26 15:39:53 -07:00
Andy Leiserson
0c629bb3c2 [naga] cli support for process_overrides compaction (#7792) 2025-06-26 14:12:18 -07:00
Zachary Harrold
4c39227510 Allow Naga spv-in and spv-out in no_std (#7760)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-26 16:45:47 -04:00
Vecvec
0d61648eeb Allow enabling additional vulkan extensions in Adapter::open and Instance::init (#7829)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-26 20:39:41 +00:00
Simon Hausmann
208fe4c23d Expose the DxgiAdapter in the Hal adapter (#7852) 2025-06-26 16:34:59 -04:00
Andreas Reich
12808193fe Fix warnings for unrecognized Vulkan present mode (#7850) 2025-06-26 09:33:20 -04:00
Zachary Harrold
995efddc62 Fix portable-atomic on wgpu-hal (#7735) 2025-06-26 08:48:41 +02:00
SupaMaggie70Incorporated
e40e66d205 DXIL & HLSL passthrough (#7831)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-25 18:12:58 -04:00
Mendy Berger
4c08c37a46 Expose raw_factory (#7827)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-06-25 19:43:23 +00:00
Erich Gubler
df272d3cfc chore(CHANGELOG): merge Unreleased/New features/Naga sections (#7802) 2025-06-25 15:02:56 -04:00
Vecvec
dc0d457a9a Add limits for acceleration structures (#7845) 2025-06-25 14:49:55 -04:00
Erich Gubler
9d14871f01 Fix OpenBSD compilation of wgpu_hal::vulkan::drm (#7810) 2025-06-25 18:02:35 +00:00
Andy Leiserson
402a479027 [metal] Retain references with command buffers (#7842) 2025-06-25 11:40:25 -04:00
atlv
0c05dbf5c9 fix(webgpu): set_unclipped_depth (#7841) 2025-06-24 15:12:47 +02:00
renovate[bot]
440b33f4c6 Update Cargo.lock (#7839)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-23 10:47:28 -04:00
Jim Blandy
3f96ba2980 Skip wgpu_gpu::oom::query_set_oom_test on Vulkan.
Vulkan's `VK_EXT_memory_budget` extension doesn't cover query sets, so
`wgpu_hal::vulkan::Device::error_if_would_oom_on_resource_allocation`'s
tactic doesn't work to anticipate OOM errors from the Vulkan driver
when creating query sets.

Without these checks, `wgpu_gpu::oom::query_set_oom_test` actually
consumes a significant amount of memory and attracts the attention of
the system's OOM killer. While it does get killed, the situation tends
to adversely affect the stability of the rest of the system, and thus
is not a friendly thing for a test run to do (#7817).

This change can be reverted once a suitable accounting method for
query sets has been implemented on Vulkan.
2025-06-18 08:21:13 -07:00
Andy Leiserson
3a5d0f2747 Deferred error reporting for other command encoder operations
* clear commands
* query set functions
* command_encoder_as_hal_mut
* ray_tracing
2025-06-17 16:17:43 -07:00
Andy Leiserson
e702d1c116 Deferred error reporting for transfer commands 2025-06-17 16:00:49 -07:00
Jamie Nicol
8cdbcc1755 Add ExternalTexture BindingType behind new Feature flag
Adds a new feature flag, `EXTERNAL_TEXTURE`, indicating device support
for our implementation of WebGPU's `GPUExternalTexture` [1] which will
land in upcoming patches. Conceptually this would make more sense as a
downlevel flag, as it is a core part of the WebGPU spec which we do not
yet support. We do not want, however, to cause applications to reject
adapters because we have not finished implementing this, so for now we
are making it an opt-in feature.

As an initial step towards supporting this feature, this patch adds a
new `BindingType` corresponding to WebGPU's
`GPUExternalTextureBindingLayout` [2]. This binding type dictates that
when creating a bind group the corresponding entry must be either an
external texture or a texture view with certain additional requirements
[3].

As of yet wgpu has no concept of an external texture (that will follow
in later patches) but for now this patch ensures that texture views
corresponding to an external texture binding type are validated
correctly. Note that as the feature flag is not yet supported on any
real backends, bind group layout creation will fail before getting the
chance to attempt to create a bind group. But in the added tests using
the noop backend we can see this validation taking place.

[1] https://www.w3.org/TR/webgpu/#gpuexternaltexture
[1] https://www.w3.org/TR/webgpu/#dictdef-gpuexternaltexturebindinglayout
[2] https://gpuweb.github.io/gpuweb/#bind-group-creation
2025-06-17 15:00:29 -07:00