Commit Graph

6966 Commits

Author SHA1 Message Date
Leon
1823f8bbdf
Fixes and changes to the documentation for increasing clarity (#4806)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-12-01 14:02:00 -05:00
Leo Kettmeir
41fb222726
update deno (#4801) 2023-11-30 15:29:30 +01:00
Jim Blandy
a9c582166d [naga] Improve ConstantEvaluatorError::InvalidCastArg message. 2023-11-29 19:56:47 +01:00
teoxoy
08506fe1b7 add changelog entry 2023-11-29 19:55:18 +01:00
teoxoy
acdc9fcced move alignments & downlevel .clone()s inside function 2023-11-29 19:55:18 +01:00
teoxoy
6ff5f8e4ad improve features/limits docs 2023-11-29 19:55:18 +01:00
teoxoy
da73522720 rename DeviceDescriptor.limits to DeviceDescriptor.required_limits 2023-11-29 19:55:18 +01:00
teoxoy
9be6c8890f rename DeviceDescriptor.features to DeviceDescriptor.required_features 2023-11-29 19:55:18 +01:00
ComfyFluffy
c4ef520657
Add space to a comment inside make_spirv_raw (#4804) 2023-11-29 18:47:57 +00:00
Andreas Reich
8da4925948
Remove surface extent validation (and thus fix the annoying Requested size ... is outside of the supported range warning) (#4796)
* Remove surface extent validation

* silence pnext vulkan validation warning which can happen on surface resize

* remove old VUID-VkSwapchainCreateInfoKHR-imageExtent-01689 validation warning ignore

* Validate surface against max texture size
2023-11-29 18:21:26 +01:00
dependabot[bot]
418493239a
Bump wasm-bindgen-futures from 0.4.38 to 0.4.39 (#4799)
Bumps [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen) from 0.4.38 to 0.4.39.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: wasm-bindgen-futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 13:42:12 +01:00
Jim Blandy
5a3887a49f [naga wgsl-in] Constructors with types don't make abstract values.
When a constructor builtin has an explicit type parameter, like
`mat2x2<f32>`, it should not produce an abstract matrix, even if its
arguments are abstract.
2023-11-29 08:58:47 +01:00
Jim Blandy
fe4d412aea [naga wgsl-in] Matrix constructors have only float overloads. 2023-11-29 08:58:47 +01:00
Jim Blandy
85dd4048df [naga] Improve snapshot output when validation fails. 2023-11-29 08:58:47 +01:00
Jim Blandy
50a75fb79f [naga wgsl-in] Clarify match in automatic_conversion_join.
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-11-29 08:58:47 +01:00
Jim Blandy
601f235b34 [naga wgsl-in] Implement abstract types for consts, constructors. 2023-11-29 08:58:47 +01:00
Jim Blandy
0b79599a8e [wgsl-in]: Remove Components::Many::first_component_ty_inner.
Delete the `first_component_ty_inner` field from
`front::wgsl::lower:🚧:Components::Many`. With the
introduction of abstract types, it will no longer be possible to infer
the type of the vector being constructed by looking at the type of its
first constructor argument alone: automatic conversion rules might
need to be applied to that argument.
2023-11-29 08:58:47 +01:00
Jim Blandy
9d20784223 [naga wgsl-in] Reformat match statement for better patch stability.
The large `match` statement in `Lowerer::construct` seems to flop back
and forth between two indentation levels as it's edited, making the
diffs hard to read. Rewrite it to use deferred initialization of
`expr`, so that `cargo fmt` doesn't have to decide whether or not to
put the `match` on the same line as `let expr`. This makes subsequent
diffs easier to read.
2023-11-29 08:58:47 +01:00
Jim Blandy
e75fb3c224 [naga] Introduce Literal::AbstractInt and AbstractFloat.
Introduce new variants of `naga::Literal`, `AbstractInt` and
`AbstractFloat`, for representing WGSL abstract values.
2023-11-29 08:58:47 +01:00
Jim Blandy
276c978b70 [naga] Introduce ScalarKind::AbstractInt and AbstractFloat.
Introduce new variants of `naga::ScalarKind`, `AbstractInt` and
`AbstractFloat`, for representing WGSL abstract types.
2023-11-29 08:58:47 +01:00
dependabot[bot]
723b8baf2a
Bump web-sys from 0.3.65 to 0.3.66 (#4800)
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.65 to 0.3.66.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: web-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 02:03:18 -05:00
dependabot[bot]
e0f83dc38c
Bump JamesIves/github-pages-deploy-action from 4.4.3 to 4.5.0 (#4798)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases)
- [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.4.3...v4.5.0)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 02:02:55 -05:00
dependabot[bot]
3a448b8378
Bump winit from 0.29.3 to 0.29.4 (#4784)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-28 12:20:20 -05:00
dependabot[bot]
e5d5a492b6 Bump js-sys from 0.3.65 to 0.3.66
Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.65 to 0.3.66.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: js-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 12:01:11 -05:00
Xiaopeng Li
a6503e59c9
Support nv12 texture format (#4573)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-11-28 16:11:26 +00:00
Jacob Hughes
f9711831d2 Rename gpu.rs to root.rs 2023-11-28 10:46:28 -05:00
Jacob Hughes
00a8a9f89f Delete root.rs so git recognizes rename in following commit 2023-11-28 10:46:28 -05:00
Alphyr
fbbb7a0516
Fix Arcanization changelog (#4795) 2023-11-28 10:43:41 -05:00
Mauro Gentile
238c3732a4
Don't keep a strong ref in storage for destroyed resources (#4786) 2023-11-27 13:37:09 +01:00
Mauro Gentile
2c67f79970
Remove resources ONLY when needed inside wgpu and not in user land (#4782) 2023-11-27 13:09:50 +01:00
Connor Fitzgerald
4f24c31765
Fixes for Skybox and All Examples (#4780) 2023-11-27 11:40:37 +01:00
TÖRÖK Attila
2964eed6f9
Bump web-sys to 0.3.65 (#4777) 2023-11-26 17:54:29 -05:00
Mauro Gentile
281a7aecd5
remove_abandoned fix (#4781)
* remove_abandoned fix

* Updated doc
2023-11-26 14:58:00 +00:00
Gerard Fabregó
12ee31d6f9
Update examples readme files (#4774)
* Fix indentation in main examples readme file

* Update examples readme files

* Update hello_compute example readme and fix example not running with new command

* Fix srgb_blend example not working correctly and set readme accordingly
2023-11-25 22:59:40 +00:00
Connor Fitzgerald
7a37229630
Revamp Examples to Match Website (#4765)
* Revamp examples to match website

* Small fixes

* Fix stencil_triangles on resize

* Fix

* Fix everything
2023-11-25 17:20:11 -05:00
Nicolas Silva
ebcfd25b58
Downgrade resource lifetime management log level to trace. (#4772)
* Downgrade resource lifetime management log level to trace.

Allow promoting it back to info via an feature flag.

* Don't filter out info and warning log in the examples.

* Changelog entry.
2023-11-25 17:33:02 +01:00
Teodor Tanasoaia
f4c6faf773
Rename ALLOW_NONCOMPLIANT_ADAPTER to ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER (#4760)
* rename `ALLOW_NONCOMPLIANT_ADAPTER` to `ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER`

* clarify comment
2023-11-24 14:29:54 -05:00
Nicolas Silva
ca4e1313f7
Downgrade some of wgpu_core's logging level from info to trace and debug (#4771)
* Downgrade storage log level from info to trace

* Downgrade tracking log level from info to trace

* Demote present log from info to debug

* Downgrade device/life.rs log from info to debug and trace

* Downgrade more log from info to trace
2023-11-24 20:09:36 +01:00
Nicolas Silva
350c9633fe
Conditionally lift API logging from trace to info level (#4769)
* Conditionally lift API logging from trace to info level

Most of this logging used to be info level until I demoted it to trace. Unfortunately this gets in my way because:
 - Most of the logging I currently need is these API entry points, there is is a fair amount of more verbose logging in wgpu at higher levels than trace
 - Firefox disable all trace and debug logging for optimized builds, which means I miss the this API logging where I need most.

This patch lifts the api logging back to info level.

* Move the api logging behind the api_log macro
2023-11-24 19:14:38 +01:00
Jim Blandy
48091784a1 [naga] Make the example_wgsl test build without wgsl-in feature. 2023-11-24 13:17:30 +01:00
Jim Blandy
86562e69a6 [naga] Support casting to f64 in the constant evaluator. 2023-11-23 12:17:21 +01:00
Jim Blandy
eb92ab2878 [naga wgsl] Experimental 64-bit floating-point literals.
In the WGSL front and back ends, support an `lf` suffix on
floating-point literals to yield 64-bit integer literals.
2023-11-23 12:17:21 +01:00
Connor Fitzgerald
06e9876adf
Move to A Single Example Executable (#4756)
* Move to combined examples

* Fix paths

* Curtail some tests

* Format

* Clippy

* Fix wasm

* Refactor main for wasm

* Style sheet

* Readme

* Lock
2023-11-23 05:26:42 -05:00
Connor Fitzgerald
3c261f3652
Allow Tests to Expect Certain Panic or Validation Messages (#4748) 2023-11-23 03:49:01 -05:00
i509VCB
1a7db86917
wgpu-hal(vk): Add WGPU_ALLOW_NONCOMPLIANT_ADAPTER (#4754) 2023-11-22 23:13:29 -05:00
Connor Fitzgerald
eadd750412
Fix Mac Event Loop (#4753)
* Fix mac

* Format
2023-11-22 15:50:12 -05:00
Nicolas Silva
039660ec85
Logging cleanups in device/global.rs (#4752)
* Clean up the trace-level logging for devices

* Log the descriptors for create_buffer and create_texture.

* Make logged ids more concise

Logged ids go from 'Id { index: 204, epoch: 1, backend: Vulkan }' to 'Id(204,1,vk)'.

* Log errors in more places.
2023-11-22 19:28:55 +00:00
Jim Blandy
4f9cc288e3 [naga] Make compaction preserve named types, even if unused.
Have `compact::compact` preserve entries in the `Module::types` arena
if they have names.

Future abstract type support will require the WGSL front end to
compact the module before validation. Without this change, that will
drop `alias` declarations, making it harder to test type validation.
2023-11-22 18:33:59 +01:00
Jim Blandy
3f0465be59 [naga wgsl-in] Preserve type names in alias declarations.
Given a WGSL `alias` declaration, create a Naga `Type` with the
alias's name, rather than dropping the type name on the floor.
2023-11-22 18:17:02 +01:00
Erich Gubler
1cf0fe841a test(naga): add struct-layout test 2023-11-22 03:54:16 -07:00