Skip to content

Commit

Permalink
Merge branch 'trunk' into vertex-format-1-component
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanderc authored Dec 7, 2024
2 parents d788e62 + f8b67a7 commit 664d2a0
Show file tree
Hide file tree
Showing 138 changed files with 6,077 additions and 8,121 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ jobs:
run: taplo format --check --diff

- name: Check for typos
uses: crate-ci/typos@v1.27.3
uses: crate-ci/typos@v1.28.1

check-cts-runner:
# runtime is normally 2 minutes
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ Bottom level categories:

## Major changes

### Refactored Dispatch Between `wgpu-core` and `webgpu`

The crate `wgpu` has two different "backends", one which targets webgpu in the browser, one which targets `wgpu_core` on native platforms and webgl. This was previously very difficult to traverse and add new features to. The entire system was refactored to make it simpler. Additionally the new system has zero overhead if there is only one "backend" in use. You can see the new system in action by using go-to-definition on any wgpu functions in your IDE.

By @cwfitzgerald in [#6619](https://github.com/gfx-rs/wgpu/pull/6619).

### Render and Compute Passes Now Properly Enforce Their Lifetime

A regression intoduced in 23.0.0 caused lifetimes of render and compute passes to be incorrectly enforced. While this is not
a soundness issue, the intent is to move an error from runtime to compile time. This issue has been fixed and restored to the 22.0.0 behavior.

### The `diagnostic(…);` directive is now supported in WGSL

Naga now parses `diagnostic(…);` directives according to the WGSL spec. This allows users to control certain lints, similar to Rust's `allow`, `warn`, and `deny` attributes. For example, in standard WGSL (but, notably, not Naga yet—see <https://github.com/gfx-rs/wgpu/issues/4369>) this snippet would emit a uniformity error:
Expand Down Expand Up @@ -103,6 +114,7 @@ By @ErichDonGubler in [#6456](https://github.com/gfx-rs/wgpu/pull/6456), [#6148]
- Add support for GLSL `usampler*` and `isampler*`. By @DavidPeicho in [#6513](https://github.com/gfx-rs/wgpu/pull/6513).
- Expose Ray Query flags as constants in WGSL. Implement candidate intersections. By @kvark in [#5429](https://github.com/gfx-rs/wgpu/pull/5429)
- Add new vertex formats (`{U,S}{int,norm}{8,16}`, `Float16` and `Unorm8x4Bgra`). By @nolanderc in [#6632](https://github.com/gfx-rs/wgpu/pull/6632)
- Allow for override-expressions in `workgroup_size`. By @KentSlaney in [#6635](https://github.com/gfx-rs/wgpu/pull/6635).

#### General

Expand All @@ -119,6 +131,7 @@ By @ErichDonGubler in [#6456](https://github.com/gfx-rs/wgpu/pull/6456), [#6148]

#### General

- Align Storage Access enums to the webgpu spec. By @atlv24 in [#6642](https://github.com/gfx-rs/wgpu/pull/6642)
- Make `Surface::as_hal` take an immutable reference to the surface. By @jerzywilczek in [#9999](https://github.com/gfx-rs/wgpu/pull/9999)
- Add actual sample type to `CreateBindGroupError::InvalidTextureSampleType` error message. By @ErichDonGubler in [#6530](https://github.com/gfx-rs/wgpu/pull/6530).
- Improve binding error to give a clearer message when there is a mismatch between resource binding as it is in the shader and as it is in the binding layout. By @eliemichel in [#6553](https://github.com/gfx-rs/wgpu/pull/6553).
Expand Down Expand Up @@ -153,6 +166,10 @@ By @ErichDonGubler in [#6456](https://github.com/gfx-rs/wgpu/pull/6456), [#6148]
- Fix crash when a texture argument is missing. By @aedm in [#6486](https://github.com/gfx-rs/wgpu/pull/6486)
- Emit an error in constant evaluation, rather than crash, in certain cases where `vecN` constructors have less than N arguments. By @ErichDonGubler in [#6508](https://github.com/gfx-rs/wgpu/pull/6508).

### Testing

- Tests the early returns in the acceleration structure build calls with empty calls. By @Vecvec in [#6651](https://github.com/gfx-rs/wgpu/pull/6651).

## 23.0.1 (2024-11-25)

This release includes patches for `wgpu`, `wgpu-core` and `wgpu-hal`. All other crates remain at [23.0.0](https://github.com/gfx-rs/wgpu/releases/tag/v23.0.0).
Expand Down
120 changes: 120 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
This document is a guide for contributions to the WGPU project.

## Welcome!

First of all, welcome to the WGPU community! 👋 We're glad you want to
contribute. If you are unfamiliar with the WGPU project, we recommend you read
[`GOVERNANCE.md`] for an overview of its goals, and how it's governed.

[`GOVERNANCE.md`]: ./GOVERNANCE.md

## Talking to other humans in the WGPU project

The WGPU project has multiple official platforms for community engagement:

- The Matrix channel [`wgpu:matrix.org`](https://matrix.to/#/#wgpu:matrix.org)
is dedicated to informal chat about contributions the project. It is
particularly useful for:

- …saying hello, and introducing yourself.
- …validating contributions (i.e., determining if they'll be accepted,
ensuring your approach is correct, making sure you aren't wasting effort,
etc.).
- …setting expectations for contributions.

Notification in Matrix can sometimes be unreliable. Feel free to explicitly
tag people from whom you would like attention, esp. to follow-up after a day
or so if you do not get a response to your contributions.

- [GitHub issues] are used to discuss open development questions and track work
the community intends to complete; this might include:

- Work that needs resolution via pull requests (see below)
- Bug reports
- Feature requests
- Creating new releases of crates
- Recording project decisions formally.
- Architectural discussion
- ???
- Compiling sets of other issues needed for a specific feature or use case
(AKA `[meta]` issues).

- [GitHub pull requests]: Modifications to the contents of this repository are
done through pull requests.
- [GitHub discussions]: TODO: Experimentally used by some enthusiastic members
of our community. Not supported officially.

[GitHub discussions]: https://github.com/gfx-rs/wgpu/discussions
[GitHub issues]: https://github.com/gfx-rs/wgpu/issues
[GitHub pull requests]: https://github.com/gfx-rs/wgpu/pulls

## Contributing to WGPU

Community response to contributions are, in general, prioritized based on their
relevance to WGPU's mission and decision-making groups' interest (see
[`GOVERNANCE.md`]).

### "What can I work on?" as a new contributor

TODO

We discourage new contributors from submitting large changes or opinionated
refactors unless they have been specifically validated by WGPU maintainership.
These are likely to be rejected on basis of needing discussion before a formal
review.

### Setting up a WGPU development environment

We use the following components in a WGPU development environment:

- [The version of the Rust toolchain with the `cargo` command][install-rust],
pointed to by `rust-toolchain.toml` at the root of the repository, to compile
WGPU's code.
- [Taplo](https://taplo.tamasfe.dev/) to keep TOML files formatted.

Once these are done, you should be ready to hack on WGPU! Drop into your
favorite editor, make some changes to the repository's code, and test that WGPU
has been changed the way you expect. We recommend
[using a `path` dependency][path-deps] in Cargo for local testing of changes,
and a [`git` dependency][git-deps] pointing to your own fork to share changes
with other contributors.

Once you are ready to request a review of your changes so they become part of
WGPU public history, create a pull request with your changes committed to a
branch in your own fork of WGPU in GitHub. See documentation for that
[here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).

[install-rust]: https://www.rust-lang.org/tools/install
[path-deps]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies
[git-deps]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories

### What to expect when you file an issue

TODO

- Describe the filing process
- Link to new issue page
- Describe how to socialize the issue effectively
- Feel free to ping us if it's a blocker!
- Suggesting tags is helpful.
- Describe how the project will handle the issue
- Our ability to respond to an issue depends entirely on whether it is
_actionable_ (viz., that there is a course of action that is reasonable
for a volunteer to take the time to do). If it's not actionable, we
reserve the right to close it.
- Being responsive to requests for further information is important.
- Understanding what point in the repository's history an issue began is
also important. Maybe link to `git bisect` or something similar?
- In particular, expecting others to fix something hardware- or
driver-specific that current maintainership (1) can't mentor you
into fixing and (2) otherwise isn't being prioritized are likely to
be closed.

### What to expect when you submit a PR

TODO: It is strongly recommended that you validate your contributions before
you make significant efforts…

The "Assigned" field on a PR indicates who has taken responsibility
for reviewing the PR, not who is responsible for the content of the
PR.
Loading

0 comments on commit 664d2a0

Please sign in to comment.