Commit Graph

609 Commits

Author SHA1 Message Date
Kevin Reid
3447b3e7b6 Polish documentation of PresentMode.
* Link to where it is used and how to check support.
* Link from `Auto*` to the variants they refer to.
* Organize mode information into lists.
* Document which value is the default value.
* Various wording changes.

I mostly did not touch the descriptions of the individual modes.
I think that they could use some explanation of jargon (what is a
“presentation engine”, really?) but I am not the person to write that.
2025-02-24 10:15:40 +01:00
Connor Fitzgerald
ae5dc0e7cb Target Specific Compilation (#7076) 2025-02-22 12:38:58 +01: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
eea3dde67e fix: use separate pub consts for FeaturesWebGPU 2025-02-14 12:18:41 -05:00
Erich Gubler
b05e9705bf fix: add cbindgen:ignore on const with the same ident. 2025-02-14 12:18:41 -05:00
Erich Gubler
a7a5784156 refactor: use match instead of if let for Features::from_bits 2025-02-14 12:18:41 -05:00
Erich Gubler
8ecafe2750 refactor: use match, instead of if, for Features::from_name 2025-02-14 12:18:41 -05:00
Erich Gubler
e8e09d059f fix: use same visibility for Features fields as itself 2025-02-14 12:18:41 -05:00
Erich Gubler
26eded137a fix: allow(missing_docs) on Features fields 2025-02-14 12:18:41 -05:00
Erich Gubler
36ad109d7a style: fmt. bitflags_array! macro a bit
Most important points:

- Make macro repetitions easy to parse as a human.
- Try to follow `rustfmt` a bit more closely.
2025-02-14 12:18:41 -05:00
Bruce Mitchener
7fe8e3818a wgpu-types: Improve formatting of docs (#7125) 2025-02-13 12:25:21 -05:00
Kevin Reid
118a985ccd Allow creating Noop backend through the normal mechanisms. 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
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
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
Andreas Reich
e5e7138169 Expose FeaturesWGPU & FeaturesWebGPU via wgpu crate & implement From (#7086)
* move tests into conditionally compiled mod and place them at the end. add some whitespace for readability

* allow creation of `Features` from `FeaturesWGPU` & `FeaturesWebGPU`
2025-02-10 09:19:14 +01:00
Vecvec
6558deb204 Split up features. (#6905)
Splits up features into wgpu & webgpu features.
2025-02-08 17:38:06 +01: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
Connor Fitzgerald
a1fc4a0316 Allow Short Circuting GL Fences (#6942) 2025-01-21 19:28:14 +00:00
Connor Fitzgerald
4ed5021996 Ban Dynamic Offsets and Binding Arrays in the Same Bind Group (#6811)
* Ban Dynamic Offsets and Binding Arrays in the Same Bind Group

* Add Tests and Uniform Buffer Restriction
2025-01-20 13:28:32 -05:00
Connor Fitzgerald
779261e64d Release v24 (#6923) 2025-01-15 16:29:22 -05:00
Connor Fitzgerald
0f37714fb8 Separate Out Backend Options into Individual Structs (#6895) 2025-01-15 17:32:15 +00: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
Vecvec
0b2c9e4f4b [Ray-tracing] Change index offset to first index (#6873)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-14 16:56:24 -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
the letter L
1aabf22e7a fix cts_runner (#6840)
* fix: unbreak compute_pass execution and state

* fix: cts_runner js_runtime needs Permissions struct

* fix: ColorWrites bitflags serde

---------

Co-authored-by: turbocrime <turbocrime@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-10 16:46:10 +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
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
991ee61026 Impl Hash on AdapterInfo and DeviceType (#6869) 2025-01-06 20:42:22 -05:00
Connor Fitzgerald
4124fbfff1 Raise Vulkan/DX12/GL max_color_attachment_bytes_per_sample Limit (#6866) 2025-01-06 20:23:47 -05:00
Andreas Reich
fb210ab363 Pass InstanceDescriptor by reference and make it clonable (#6849) 2025-01-06 15:40:30 -05:00
Xiaopeng Li
15a77b525c expose VULKAN_EXTERNAL_MEMORY_WIN32 feature (#6825) 2025-01-02 19:48:54 -05:00
Samson
ee3ae0e549 [core] Use higher level LoadOp,StoreOp (#6785) 2024-12-22 21:48:11 -05:00
Samson
d63ca09c34 Add usage to TextureViewDescriptor (#6755)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-12-18 18:38:28 +01:00
Erich Gubler
b2c9b0af5a chore: add web_sys_unstable_apis to lints.rust.unexpected_cfgs.check-cfg in wgpu_{hal,types} 2024-12-17 13:30:52 -05:00
Connor Fitzgerald
89a8867f9b Enable Partial Binding on DX12 (#6734) 2024-12-16 15:47:19 +00:00
Christofer Nolander
21ff9686a7 Add 1-component ({s,u}{int,norm}{8,16}, float16) and unorm8x4-bgra vertex formats (#6632)
* feat: add missing 8/16-bit vertex formats (and 8-bit bgra) #6614

* add tests for 1-component vertex formats (and bgra)

* metal: unpacking function for 1-component vertex formats

* test: use proper alignment for float16 vertex format

* changelog: new vertex formats
2024-12-16 10:18:50 -05:00
Connor Fitzgerald
411ffa7a5a Make Force Loop Bounding Optional (#6662)
* Make Force Loop Bounding Optional

Co-authored-by: rudderbucky <anandkwork7@gmail.com>

* Deprecate and Rename

---------

Co-authored-by: rudderbucky <anandkwork7@gmail.com>
2024-12-16 04:23:22 -05:00
Vecvec
3cc63af1a5 remove claimed support for unsupported feature on dx12. (#6724) 2024-12-13 17:23:40 -05:00
Connor Fitzgerald
fdb6266d36 Update Some Repository Documentation (#6708)
* Update Some Repository Documentation

* Capitalization
2024-12-12 04:54:42 +00:00
atlv
55d5d26835 Renumber bitflags sort (#6709) 2024-12-12 00:32:55 +00:00
atlv
22c8f8c503 Clean up guaranteed_format_features (#6702) 2024-12-11 08:48:37 -05:00