Commit Graph

9013 Commits

Author SHA1 Message Date
Jim Blandy
630c12fe47 Update publish.yml workflow's wasm-bindgen version to 0.2.83. (#3351)
In order to update wgpu.rs, the version of wasm-bindgen specified in
`.github/workflows/publish.yml` must exactly match that in the main
`Cargo.lock` file. This is currently 0.2.83.
2023-01-04 16:11:08 -08:00
Jinlei Li
33e5b7af26 vulkan feature exclude macOS and iOS by default (#3292)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/3287
2023-01-04 21:35:29 +00:00
Teodor Tanasoaia
784ee43be7 Make ObjectId structure and invariants idiomatic (#3347) 2023-01-04 15:13:59 -05:00
Rainb0w :3
e98bd9264c [glsl-out] emit reflection info for non-struct uniforms (#2189) 2023-01-04 20:26:52 +01:00
Xiaopeng Li
71f50409e6 GraphicsCommandList validation (#3204)
* GraphicsCommandList validation

* Add change to CHANGELOG.md

* Close command list

* Destroy command buffer

* Find valid command list for reuse

* Fix clippy
2023-01-04 14:22:39 +01:00
Nathan Adams
186a29c34d Implement TextureFormat::Stencil8 + add stencil example (#3343)
* Implement TextureFormat::Stencil8

* Add stencil-triangles demo to test Stencil8 and show how to use stencil testing

* Added changelog for Stencil8
2023-01-02 13:47:10 +01:00
Erich Gubler
224ff3897d build(cli): use conventional bin path for naga-cli 2022-12-27 10:38:37 -08:00
PENGUINLIONG
24316fd4bc Allow u32 coordinates for textureStore/textureLoad (#2172) 2022-12-22 18:59:22 +01:00
Dzmitry Malyshau
02280a7357 msl: handle the case of missing binding (#2175) 2022-12-22 11:21:21 +01:00
Connor Fitzgerald
aa46e82f40 Fix texture view creation with full-resource views when using an explicit mip_level_count or array_layer_count 2022-12-21 17:24:46 -05:00
Connor Fitzgerald
9670e9e6b9 Make sure all doctests and tests in wgpu-types run 2022-12-21 17:24:46 -05:00
Andreas Reich
eaa87ba42c Force all adapters to report min buffer alignment of 32 (#3262) 2022-12-21 13:46:15 -05:00
Zhixing Zhang
8e1b0529e6 Supporting gl_PointCoord (#2180) 2022-12-21 13:05:15 +01:00
Connor Fitzgerald
6f4ec4fbab Properly expose [Adapter::get_presentation_timestamp] (#3321) 2022-12-21 01:27:16 -05:00
Jim Blandy
37be4df2b8 Fix warnings when building tests without validation. 2022-12-20 22:24:24 -08:00
Connor Fitzgerald
9b9cc330ca Fix up strict-assert usage (#3320)
* Removes unused assertions.rs

* Strict assert macro fixes

* Strict asserts shouldn't be default on wgpu
2022-12-20 22:04:45 -08:00
Connor Fitzgerald
4c5fef4a28 Re-add indirect execution to vulkan downlevel flags (#3319)
Closes https://github.com/gfx-rs/wgpu/issues/3318
2022-12-20 21:06:12 +00:00
Connor Fitzgerald
6b6bc69ba0 Check for webgl2 validation errors and catch issues (#3296) 2022-12-20 15:51:17 -05:00
Connor Fitzgerald
5241633b3a Implement Presentation Timestamp Correlation (#3240)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-12-20 17:52:08 +00:00
Elabajaba
f3c50918c2 Suballocate DX12 buffer creation (#3163)
closes https://github.com/gfx-rs/wgpu/issues/2720
2022-12-20 12:23:44 -05:00
Teodor Tanasoaia
62e932b0a8 Add missing DEPTH_BIAS_CLAMP and FULL_DRAW_INDEX_UINT32 downlevel flags (#3316)
* add missing `DEPTH_BIAS_CLAMP` and `FULL_DRAW_INDEX_UINT32` downlevel flags

* add changelog entry

* use require_downlevel_flags
2022-12-20 18:21:54 +01:00
Teodor Tanasoaia
c91cae47d2 [dxgi] fix depth16Unorm formats for nodepth and typeless (#3313)
* [dxgi] fix `depth16Unorm` formats for nodepth and typeless

* add changelog entry
2022-12-20 15:29:43 +01:00
Teodor Tanasoaia
14886ee142 Sync depth/stencil copy restrictions with the spec (#3314)
* sync depth/stencil copy restrictions with the spec

* add changelog entry
2022-12-20 15:26:00 +01:00
Teodor Tanasoaia
8ca6e385ba Sync TextureFormat.describe with the spec (#3312)
* sync TextureFormat.describe with the spec

* add changelog entry
2022-12-20 15:23:15 +01:00
i509VCB
052bd17d41 Context dynamic dispatch (#3051) 2022-12-19 19:17:19 -05:00
Jim Blandy
de070b2846 Fix documentation comments for Rust 1.66. (#3310)
Somewhere after 1.64 but by 1.66, `rustdoc` started checking for
unmatched HTML tags in doc strings, meaning that text like

    /// Convenience function turning Option<Selector> into this enum.

causes problems, since `rustdoc` will pass through `<Selector>` as
HTML tag, which browsers displaying the output will misunderstand.
2022-12-19 11:41:19 -08:00
Andreas Reich
46831a8b25 deref/deref_mut methods on buffer-views inline (#3307)
* mark deref/deref_mut methods on buffer-views inline

* inline for deref for both direct/web backend

* changelog entry
2022-12-19 15:40:47 +01:00
Erich Gubler
461fdda425 Add handle validation pass to Validator (#2090)
Before proceeding with any other validation, check that all Handles are valid for their arenas, and refer only to older handles than themselves. This allows subsequent stages to simply use indexing without panics, assuming validation has passed.
2022-12-17 00:26:43 +00:00
Erich Gubler
3cc6621fd3 Resolve Rust 1.66 clippy lints (#3304) 2022-12-16 17:23:12 -05:00
David Huculak
f14bee6740 Add blit shader comment (#3301) 2022-12-16 01:34:32 -05:00
Jim Blandy
0e4c7dd6d2 Remove workspace inheritance (#3295) 2022-12-15 15:46:28 -05:00
Imbris
645469d2f9 Small typo fix in TextureViewDescriptor docs (#3300) 2022-12-15 15:19:00 -05:00
Erich Gubler
420c9845f8 refactor: resolve clippy::manual_clamp 2022-12-15 11:20:47 -08:00
Erich Gubler
3c26ffb07a fix(docs): fix invalid <...> URLs with code spans 2022-12-15 11:20:47 -08:00
Connor Fitzgerald
3ce5ca866b Improve dynamic offset binding errors (#3294) 2022-12-15 00:53:42 +00:00
Connor Fitzgerald
2480eff65e Error when not using cargo-nextest (#3293)
Closes https://github.com/gfx-rs/wgpu/issues/3285
2022-12-15 00:09:04 +00:00
Dzmitry Malyshau
76d30e5055 Add ValidationFlags::BINDINGS 2022-12-13 12:59:28 -05:00
Avi Weinstock
5d8fc3fdcf [wgsl-in/spv-out] Add support for WGSL's atomicCompareExchangeWeak (#2165)
* Add support for WGSL's `atomicCompareExchangeWeak` with the `__atomic_compare_exchange_result` struct, and add SPIR-V codegen for it.

Partially addresses https://github.com/gpuweb/gpuweb/pull/2113, #1755.

* Add tests for `atomicCompareExchangeWeak`, and support both u32 and i32 atomics with it.

* More thorough typechecking of the struct returned by `atomicCompareExchangeWeak`.
2022-12-13 10:47:28 +01:00
teoxoy
8f1d82f0d2 [wgsl] update reserved keywords 2022-12-12 16:54:21 -08:00
Teodor Tanasoaia
9a00937b50 fix-fmt 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
300ffcafbf update error note 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
ee5c343038 fix tests 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
36bae0760d remove non-32bit integers 2022-12-12 09:46:38 -08:00
Teodor Tanasoaia
4748721857 remove comment 2022-12-12 09:33:24 -08:00
Teodor Tanasoaia
bf71b015a1 [wgsl-out] remove workgroup_size builtin 2022-12-12 09:33:24 -08:00
Teodor Tanasoaia
e671d6b49c [wgsl-in] remove workgroup_size builtin 2022-12-12 09:33:24 -08:00
robtfm
2dcb6963fa add Range::new_from_bounds 2022-12-12 11:57:23 +01:00
Jim Blandy
0197246365 Ignore unused_imports in tests/snapshots.rs.
This is for the same reason that we ignore `dead_code`:

    // A lot of the code can be unused based on configuration flags,
    // the corresponding warnings aren't helpful.
2022-12-12 11:14:17 +01:00
Jonathan Behrens
4f77cbafb7 [wgsl-out] Write correct scalar kind when width != 4 (#1514)
* [wgsl-out] Write correct scalar kind when width != 4

* slight refactoring

* Also handle matrix scalar widths

* Fix formatting
2022-12-12 10:56:28 +01:00
teoxoy
5a1f43d12d [doc] add more switch docs 2022-12-09 10:21:58 -08:00