1345 Commits

Author SHA1 Message Date
Mads Marquart
7b00140b16
Add layer observer based on raw-window-metal (#7026)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-02-20 21:30:58 +00:00
Teodor Tanasoaia
b5e32cec58
add max_shader_model to Dx12Compiler (#7167) 2025-02-18 13:44:23 +01:00
Connor Fitzgerald
194d4b1f36
New Binding Array Limit (#6952) 2025-02-17 09:22:24 -05:00
Connor Fitzgerald
d8833d0798
Use Update After Bind Descriptors for Bind Groups With Binding Arrays (#6815)
* Use Update After Bind Descriptors for Bind Groups With Binding Arrays

Update After Bind

x

* Comments

* Fix URL
2025-02-15 12:02:27 -05:00
Connor Fitzgerald
7e119968ce
Properly Deal with Timeouts (#7030) 2025-02-14 23:19:51 +00:00
Erich Gubler
b05e9705bf fix: add cbindgen:ignore on const with the same ident. 2025-02-14 12:18:41 -05:00
Kevin Reid
118a985ccd Allow creating Noop backend through the normal mechanisms. 2025-02-12 22:31:47 -05:00
Kevin Reid
7293a13a97 Extend the capabilities of the Noop backend.
This will allow using it in tests of wgpu resource management code
that does not actually require a backend.

* `enumerate_adapters()` returns an adapter instead of failing.
* `open()` returns a device instead of failing.
* `create_buffer()` allocates actual memory.
* `map_buffer()` actually provides access to that memory.
* `clear_buffer()` actually clears the buffer.
* `copy_buffer_to_buffer()` actually copies data.
* Fences actually work (trivially, because all operations are
  synchronous).

Future work could include implementing texture copies,
timestamp queries, and the clearing part of render passes.
2025-02-12 22:31:47 -05:00
Kevin Reid
0143b4aaa0 Rename Empty backend to Noop.
This is in preparation for making it a more substantial test stub,
able to execute nontrivial code, and usable from the safe `wgpu` API.
2025-02-12 22:31:47 -05:00
richerfu
ff907736ef
feat(gles): support gles backend on openharmony (#7085)
* fix(gles): fix gles backend crash on openharmony

* docs: add changelog

* ci: add OpenHarmony to CI

* Update .github/workflows/ci.yml

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-02-13 03:01:50 +00:00
Adrian Wielgosik
0f5d575ef3
Lower max_color_attachments limit for GL to 4 (#6994)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2025-02-13 00:37:34 +00:00
Amr Bashir
2f607d3e64
fix(dx12): map composite alpha mode (#7117)
* fix(dx12): map composite alpha mode

closes #7108

* changelog entry

* add composite modes based on surface target

* fix missing `in` in change log entry
2025-02-12 23:02:50 +00:00
Vecvec
3a4a40aae4
[wgpu-hal] Blas compaction (#7101) 2025-02-12 13:19:07 +00:00
Vecvec
0922631125
Fix transform buffer when building blas (#7062)
Co-authored-by: Nicolas Silva <nical@fastmail.com>
2025-02-10 20:18:41 -05:00
Shaye Garg
dad9d0b577
Fix 3D Texture Views on Dx12 (#7071)
* use all w slices

* update changelog
2025-02-06 22:29:06 +00:00
Vecvec
d34707ec3f
Rename instance_id & instance_custom_index to instance_index & instance_custom_data (#6780) 2025-02-05 18:23:22 +01:00
Erich Gubler
9b76bcf12e
fix(dx12): query resource binding tier, not resource heap tier, for bindless feature check (#7059) 2025-02-05 10:41:46 -05:00
Connor Fitzgerald
d9e9c3aa19
Fix Zero Sized Sampler Heap Issue (#7054) 2025-02-03 15:49:31 -05:00
Jamie Nicol
4e7d892317
[naga msl-out hlsl-out] Improve workaround for infinite loops causing undefined behaviour (#6929)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2025-01-31 15:27:52 -05:00
@brody4hire - C. Jonathan Brody
a8cc83e17a
avoid default features in many dependencies (etc.) (#7031) 2025-01-30 10:30:42 -05:00
@brody4hire - C. Jonathan Brody
df54acc05d
use hashbrown in more crates (etc.) (#6938)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-27 11:50:33 -05:00
JMS55
0fc0b35899
Transition resources (#6678)
* WIP

* Fix typo

* WIP: Implement structure of  command_encoder_transition_resources

* WIP

* More work

* Clippy

* Fix web build

* Use new types for API, more docs

* Add very basic test

* Try to fix test cfg

* Fix merge

* Missed commit

* Use wgt types instead of hal types

* Implement `Clone` for `ShaderModule` (#6939)

* Move to dispatch trait, move more things to wgt

* Move existing code to use new wgt types

* Fixes

* Format import

* Format another file

* Fixes

* Make module private

* Fix imports

* Fix test imports

* Rexport types

* Fix imports

* Fix import

---------

Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-24 00:54:19 -05:00
Connor Fitzgerald
d8e7ab1ad1
Refactor Cargo.toml Significantly (#6980) 2025-01-23 22:49:48 +00:00
Teodor Tanasoaia
a8bd1fe1ac
[d3d12] bound check dynamic buffers (#6931)
To achieve this for dynamic storage buffers we changed the way we bind them. They now go in root tables and we pass the offset via a root constant.
2025-01-23 17:18:36 +00:00
Connor Fitzgerald
a1fc4a0316
Allow Short Circuting GL Fences (#6942) 2025-01-21 19:28:14 +00:00
Connor Fitzgerald
436f716715
Unconditionally Generate Bindless Samplers in DX12 (#6766) 2025-01-21 14:24:03 -05:00
Connor Fitzgerald
04e40dd135
Update Vulkan SDK (#6955) 2025-01-21 00:12:07 +00:00
Connor Fitzgerald
6e5c9468aa
Enable Storage Texture Binding Arrays on DX12 (#6956) 2025-01-20 16:39:16 +01:00
Connor Fitzgerald
dcdb10348b
Add Flush to GL Queue::submit (#6941) 2025-01-18 15:02:42 -05:00
sotaroikeda
3d13cc1bbe
Add a way to notify with Queue::submit() to Vulkan's vk::Semaphore allocated outside of wgpu (#6813)
Co-authored-by: Sotaro Ikeda <you@example.com>
2025-01-17 11:18:17 -05:00
@brodycj - C. Jonathan Brody
623f143a82
Start using hashbrown (#6925) 2025-01-16 14:53:36 +01:00
Connor Fitzgerald
779261e64d
Release v24 (#6923) 2025-01-15 16:29:22 -05:00
atlv
be95178709
64 bit image atomics (#5537) 2025-01-15 08:05:13 -05:00
Vecvec
21de7f7773
Support DXR in wgpu-hal & naga. (#6777)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-14 21:28:37 -05:00
atlv
18471d8e78
Image atomics support (#6706)
* Image atomics support

* Address feedback

* fix merge

* Fixes

* Add a couple tests

* Update wgpu-types/src/lib.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>

* feedback

* feedback

* glsl

* glsl fix

* fix glsl

* fix fix

* fix fix fic

* fix?

* fix

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2025-01-13 15:37:12 +00:00
Zachary Harrold
05e62f96f9
Add no_std support to wgpu-types (#6892)
* Initial Commit

* Remove now-redundant `format` import

* Update CHANGELOG.md

* Appropriately feature-gate `texture_format_serialize` test

* Remove `alloc` feature

Also fixed some documentation links and a Wasm `std` import

* Revert change to `Serialize` for `TextureFormat`

* Combine use statements

* Switch from `PathBuf` to `String`

* Consider environmental flags as unset on `no_std`

* Fix missing `format!`

* Add new CI tasks for `no_std` testing

* Comment out known failing CI matrix option

* Update all usage of `Dx12Compiler::DynamicDxc`

* Added comments to CI

* Update .github/workflows/ci.yml

* Update .github/workflows/ci.yml

* Update .github/workflows/ci.yml

* CI Touchups

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-12 05:03:47 +00:00
Eric Szentivanyi
4efc992d6d
Add raw_handle method for metal texture (#6894)
* Add `raw_handle` method for metal texture

* Add raw_handle method for metal texture (#6894)
2025-01-11 02:45:09 +00:00
Connor Fitzgerald
b0f1fa66ef
Add VisionOS Support (#6888)
* Add visionos support

* Use `target_vendor = "apple"`

* Fixes

* Build VisionOS

* Gah

* Bleh

* Typos

---------

Co-authored-by: Guus Waals <_@guusw.nl>
2025-01-10 17:33:58 +00:00
Asher Jingkong Chen
198762e5cc
feat: Add 32-bit floating-point atomics (SHADER_FLOAT32_ATOMIC) (#6234)
* feat: Add 32-bit floating-point atomics

* Current supported platforms: Metal
* Platforms to support in the future: Vulkan

Related issues or PRs:

* gfx-rs/wgpu#1020

* Add changelog

* Edit changelog

* feat: Add 32-bit float atomics support for Vulkan (SPIR-V shaders)

* atomicSub for f32 in the previous commits is removed.

* Update test

* chore: doc type link

* refactor: Revise float atomics on msl and spv

* Make branches tidy
* Also revise old codes
* Ensure the implementations are supported by Metal and Vulkan backends

* refactor: Renaming flt32 atomics to float32 atomics

* chore: Add link to Vulkan feature

* fix: cargo fmt

* chore: hack comment

* Revert changelog

* Fix: Cargo advisory

* Update wgpu-hal/src/metal/adapter.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>

* Update naga/src/lib.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>

* Adjust feature flag position

---------

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2025-01-09 16:03:47 +00:00
Jim Blandy
0d69482ace [hal/vulkan] Don't advertise features without prerequisites present.
Don't advertise features like `STORAGE_RESOURCE_BINDING_ARRAY` unless
at least one of the features it extends, like `BUFFER_BINDING_ARRAY`
or `TEXTURE_BINDING_ARRAY`, is actually present.

Replace the calls to `all_features_supported` with the equivalent
inline code, and delete the function.
2025-01-08 08:40:19 -08:00
Connor Fitzgerald
a8a91737b2
Switch Binding Arrays on Metal to Argument Buffers (#6751) 2025-01-07 16:00:56 -05:00
Connor Fitzgerald
fabcba8f9a
Refine Multi-Draw-Indirect (#6870) 2025-01-07 13:52:42 +01:00
Connor Fitzgerald
0dab31ab2a
Fix aarch64-pc-windows-msvc (#6868) 2025-01-07 02:28:05 +00:00
Connor Fitzgerald
4124fbfff1
Raise Vulkan/DX12/GL max_color_attachment_bytes_per_sample Limit (#6866) 2025-01-06 20:23:47 -05:00
Connor Fitzgerald
cb6dbb897f
Vulkan Sampler Cache (#6847) 2025-01-06 19:17:17 -05:00
Vecvec
74f3a2f919
[vulkan] allocate descriptors for acceleration structures (#6861) 2025-01-06 15:37:13 -05:00
Connor Fitzgerald
111a6a8ed1
Small Fix to Mutex Init (#6846) 2025-01-03 09:52:48 +01:00
Xiaopeng Li
15a77b525c
expose VULKAN_EXTERNAL_MEMORY_WIN32 feature (#6825) 2025-01-02 19:48:54 -05:00
Andreas Reich
c46624f1fa
Fix filtering out dx12 software adapters (#6843) 2025-01-02 14:36:23 -05:00
Benjamin Frye
4772cd8c63
fix(dxgi): DX12 exception handler lifetime based on device not adapter (#6828) 2024-12-26 11:06:50 -05:00