Commit Graph

268 Commits

Author SHA1 Message Date
Andy Leiserson
a843c880d2 [metal] Fix handling of stage visibility for binding arrays (#7479)
Fixes #7287
2025-04-04 11:20:57 -04:00
Connor Fitzgerald
c860a2cf8c Rename and unsafe start_capture -> start_graphics_debugger_capture (#7470)
* Improve `start_capture` docs

* Docs
2025-04-03 13:07:22 -04:00
Connor Fitzgerald
a9279de793 Fix assorted issues with WebGL (#7448)
* Fix validation error when configuring the surface on WebGL

* Remove unneeded `webgl` feature

* Fix compilation of the `noop` backend on `wasm32`

* Prevent `webgpu` examples from incorrectly falling back to WebGL

* Reduce dependency set when building wasm examples

* Fix various warnings
2025-03-31 22:02:21 -04:00
Andy Leiserson
d1b00c5d25 [examples] Fixes for examples on web (#7454)
Fixes #7364
2025-03-31 16:07:52 -04:00
Jer
efbfa36ded Dealing with data too large for a single buffer (#6138)
* init files, dir structure

* wip: it's working need to suss out the readme and some of the consts...

* ok that's probably good enough for a first pass...

* chore: spelling

* chore: readme tweaks

* chore: clippy and fmt

* chore: add self and changes to changelog.md

* fix: typo and remove env_logger via cfg flag for wasm builds (which this doesn't supprot anyway)

* refactor: bring inline with newer wgpu

* refactor: bring inline with newer wgpu

* chore: work on the readme a bit...

* refactor: remove a bunch of everything, be simple

* wip: get a test going

* wip: remove unrequired pub(s)...

* refactor: remove a bunch of everything, be simple

wip: get a test going

* wip: remove unrequired pub(s)...

wip: remove unrequired pub(s)...

* chore: cleanups, typos, simplifying

* chore: reconcile changelog diffs

* fix: re-add our change to the changelog

* wip: finess the docs a bit per request...

* chore: trying to get the woring right...

* chore: trying to get the woring right...

* fix: typos

* fix: spelling

* Update mod.rs

swap all loops over to 'for' by request.

Flume's sender is already Send/Sync

chunks will already split for us

.unwraps() unwraps everywhere!

* Update CHANGELOG.md

Co-authored-by: Jim Blandy <jimb@red-bean.com>

* 1GB as the example says we'll do

- 1GB as the example says we'll do
- update readme for windows users.

* init files, dir structure

* wip: it's working need to suss out the readme and some of the consts...

* ok that's probably good enough for a first pass...

* chore: spelling

* chore: readme tweaks

* chore: clippy and fmt

* chore: add self and changes to changelog.md

* fix: typo and remove env_logger via cfg flag for wasm builds (which this doesn't supprot anyway)

* refactor: bring inline with newer wgpu

* refactor: bring inline with newer wgpu

* chore: work on the readme a bit...

* refactor: remove a bunch of everything, be simple

* wip: get a test going

* wip: remove unrequired pub(s)...

* wip: remove unrequired pub(s)...

wip: remove unrequired pub(s)...

* chore: cleanups, typos, simplifying

* fix: re-add our change to the changelog

* wip: finess the docs a bit per request...

* chore: trying to get the woring right...

* chore: trying to get the woring right...

* fix: typos

* fix: spelling

* Update mod.rs

swap all loops over to 'for' by request.

Flume's sender is already Send/Sync

chunks will already split for us

.unwraps() unwraps everywhere!

* Update CHANGELOG.md

Co-authored-by: Jim Blandy <jimb@red-bean.com>

* 1GB as the example says we'll do

- 1GB as the example says we'll do
- update readme for windows users.

* bring up to date with trunk

sync with trunk.
make more of Jim's changes

* some of the consts have changed name.

* small tweaks

* what is the flag called now?

what is the flag called now?

* Update shader.wgsl

naming things betterer

* Update README.md

reword readme

* Update README.md

simplify readme

* Update mod.rs

remove unused

* well at least it compiles again

* BUG: ... it seems to run forever and never complete.

* nicer shader module creation

* ... add logging to track down infinite hangtime...

* use 2 buffers in the test

* test and example pass (now they do the same number of buffers..

* that's better...

* fix: remove duplicate entries

* fix: whitespace

* move changelog entry to #unreleased per request

* fix: target_arch != wasm to satiate pipeline

* fix: target_arch != wasm to satiate pipeline

* pipeline want's us to allow allows...

* savage hacks to make the wasm build ignore our test

* fix: allow the allowing of allows that allow the dead_code.

* Fix: no tests on wasm

---------

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2025-03-28 02:24:29 +00:00
Christian Legnitto
1ef9940114 Reduce repo MSRV from 1.85 to 1.84 (#7425)
* Reduce repo MSRV from 1.85 to 1.84

Fixes https://github.com/gfx-rs/wgpu/issues/7409

* Replace usage of task::Waker::noop()

* Gate waker code to `noop` feature

* Remove unused copied waker function

* Remove doctest from copied code
2025-03-27 14:25:19 -04:00
Connor Fitzgerald
db4cb26858 Allow overriding instance flags in tests (#7374) 2025-03-20 11:35:54 -04:00
Connor Fitzgerald
4687973c9a Use bytemuck instead of slice::from_raw_parts for transmutes (#7376) 2025-03-19 22:05:21 -04:00
Connor Fitzgerald
1c69416c32 Rename package of custom_backend example 2025-03-19 09:45:53 -04:00
Connor Fitzgerald
516459efcd Fix custom_backend compilation error when compiled alone 2025-03-19 09:45:53 -04:00
Connor Fitzgerald
c223d3544b Decouple custom_backend example from the workspace 2025-03-19 09:45:53 -04:00
Connor Fitzgerald
f109a6966a Rename custom_backend example 2025-03-19 09:45:53 -04:00
Kevin Reid
fbe005f11a Make request_adapter() report which backends were tried.
This will help users determine whether the problem is:

* a backend is not statically enabled
* a backend is not dynamically enabled
* no drivers or physical adapters are present for that backend
  (further distinction would be useful here)
* no adapters met the required criteria

There are deficiencies in the reporting of WebGPU vs. WebGL support.
Those would best be fixed by also fixing the mutual exclusion of those
backends.
2025-03-14 11:45:49 +01:00
Kevin Reid
326ad03ce1 Move trace_dir/trace_path to a custom enum inside DeviceDescriptor.
This allows `wgpu` to not unconditionally depend on `std::path::Path`.
It’s also, in my opinion, more user-friendly, because the feature which
most users will not use (and is not currently functional) is now a
defaultable struct field instead of a required parameter.

The disadvantage is that `wgpu-types` now has to know about tracing.
2025-03-10 22:17:06 -04:00
Andy Leiserson
cd1e7e26c1 Waive the failures tracked by #7287 (#7289)
* Waive the failures tracked by #7287

* Use full link to issue
2025-03-07 16:37:11 -05:00
Samson
7e66495049 Support extern context impl (#6658)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-03-04 16:07:03 -05:00
Vecvec
5b3266db23 Support getting hit vertex positions (#7183) 2025-03-04 20:06:44 +01:00
Melody Madeline Nosurname
da0b68dde3 Change skybox cybertruck model to ferris (#7237)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-02-27 18:25:57 +00:00
Connor Fitzgerald
8fb09a5ad6 Move REPO_MSRV to 1.85 (#7218) 2025-02-24 23:39:34 -05:00
Connor Fitzgerald
77763b15b3 Remove getrandom from examples (#7194) 2025-02-21 22:46:18 -05:00
Connor Fitzgerald
f44ecda16b Fix Execution of Benchmarks (#7190) 2025-02-21 11:43:50 -05:00
Connor Fitzgerald
194d4b1f36 New Binding Array Limit (#6952) 2025-02-17 09:22:24 -05:00
Connor Fitzgerald
7e119968ce Properly Deal with Timeouts (#7030) 2025-02-14 23:19:51 +00:00
Bruce Mitchener
3710de8e5b Fix clippy::doc_overindented_list_items lints (#7139) 2025-02-14 16:36:41 +00:00
Alphyr
6696c79ed0 Remove Arc around Buffer in example (#7097)
Now that `Buffer` is clonable, `Arc` is not required anymore. Reflect
that in examples.
2025-02-10 15:51:39 +01:00
Kamil Jarosz
43eb6c99b0 examples: Call pre_present_notify before presenting (#7074)
According to winit docs, pre_present_notify() should be called right
before calling present().

This actually prevents some issues on Wayland, like freezing the whole
application when the window is not visible (ask me how I know).
2025-02-10 08:19:54 +00:00
AMS21
b32cbd4ea6 Fix typo folloed -> followed (#7067) 2025-02-06 14:02:17 +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
Connor Fitzgerald
8caefceb8e Add rust-version to more crates (#7036) 2025-01-31 10:33:10 +01:00
Kevin Reid
98e080410f Fix compatibility issues in hello_window example. (#7009) 2025-01-27 12:14:20 -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
Dennis Lonoshchuk
0e7d93ed92 Adds hello window example (#6992)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-01-27 02:08:52 +00:00
Connor Fitzgerald
b233d204f7 Fix Hello Compute Shader (#6985) 2025-01-24 18:26:49 +00:00
Connor Fitzgerald
7fccb6bdb9 Standalone Compute
Fix Generate

Fix?

17th Time's The Charm

Fix Build

See Eye

Docs

Victory Tabular

Formatting

Formating3
2025-01-20 18:07:22 -05:00
Connor Fitzgerald
43b6637754 Remove Hello Example 2025-01-20 18:07:22 -05:00
Connor Fitzgerald
c73bd2fa60 Move Examples to Subfolder 2025-01-20 18:07:22 -05: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
0f37714fb8 Separate Out Backend Options into Individual Structs (#6895) 2025-01-15 17:32:15 +00: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
Connor Fitzgerald
c71d67010f Fix Features when Depending on wgpu (#6915) 2025-01-14 18:19:43 +00:00
Erich Gubler
d9cc72785b Use more Rust features allowed under REPO_MSRV (#6887)
* chore: remove `std::mem::*` imports now unnecessary with `REPO_MSRV`

`std::mem::{size,align}_of{,_val}` was added to `std::prelude` in Rust
1.80; see
[`rust`#123168](https://github.com/rust-lang/rust/pull/123168/).

* refactor(benches): s/once_cell::Lazy/std::sync::LazyLock

Weaken our dependence on the `once_cell` crate by using functionality
from `std` instead that was upstreamed from `once_cell`, this time with
what's available in Rust 1.80+.

It's not yet possible to eliminate this dependency entirely, but do what
we can with `REPO_MSRV` for now.

* chore: remove unnecessarily `allow`'d lint rules under `REPO_MSRV`

* chore: migrate easy `allow`s to `expect` under `REPO_MSRV`

Remove or `expect` clear-cut `allow` statements that were easy for me to
figure out.

* chore: `warn` on `clippy::allow_attributes` under `REPO_MSRV`
2025-01-10 22:06:26 +00:00
Andreas Reich
fb210ab363 Pass InstanceDescriptor by reference and make it clonable (#6849) 2025-01-06 15:40:30 -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
Valtteri Vallius
0fe20342e0 Add multiple render targets example (v2) (#5313)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-12-18 04:41:21 +00:00
Benjamin Frye
3918a09a4b fix: Read environment variable configs in hello_triangle example (#6698)
* fix: Read environment variable configs in hello_triangle example

* refactor: Add util method for creating entire instance descriptor from env

* fix: Fix clippy error/warning about "unneeded `return` statement"
2024-12-12 19:58:23 -05:00
Arjo Chakravarty
ef996e6139 Ensure we pick the right gpu card in the example backend (#6557) 2024-12-12 10:50:45 +01:00
Teodor Tanasoaia
a1fc2ba76d fix being able to use storage textures without TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES (#6690)
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
2024-12-10 15:34:38 -05:00
Aloke Desai
ebdd958d4b Make Surface#configure and Surface#get_current_texture non-fatal (#6253)
* Make Surface#configure non-fatal
* Make Surface#get_current_texture non-fatal

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-12-07 17:13:09 +00:00
atlv
0b6571a68d Align Storage Access enums to spec (#6642) 2024-12-03 17:37:23 +01:00