Commit Graph

1203 Commits

Author SHA1 Message Date
Connor Fitzgerald
330d112843
Bump version to 0.15.1 2023-02-09 16:02:12 -05:00
daxpedda
9c9a24928e Build for WASM on docs.rs (#3462) 2023-02-09 15:59:59 -05:00
Connor Fitzgerald
7b336805f1 Re-sort view formats (#3444) 2023-02-09 15:59:59 -05:00
Connor Fitzgerald
007d933260
Fix wgpu-core versioning 2023-01-25 19:30:39 -05:00
Connor Fitzgerald
d3fec9524f
Release of 0.15 (#3424) 2023-01-25 19:25:41 -05:00
Teodor Tanasoaia
d2809137ba
Zero-initialize workgroup memory (#3174)
fixes https://github.com/gfx-rs/wgpu/issues/2430
2023-01-25 18:28:35 -05:00
Jinlei Li
33f94c7c84
Implement view_formats for SurfaceConfiguration (#3409)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-01-25 21:04:41 +00:00
Jinlei Li
0d433214c7
validate the number of color_attachments in begin_render_pass (#3404) 2023-01-25 14:48:27 -05:00
Jinlei Li
969af43c05
move require_downlevel_flags(VIEW_FORMATS)? from create_texture_view() to create_texture() (#3420) 2023-01-25 17:33:58 +01:00
IceSentry
bb876f372a
Better error message for 16 byte alignment error (#3414)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: gilescope <gilescope@gmail.com>
Closes https://github.com/gfx-rs/wgpu/pull/3099
Closes https://github.com/gfx-rs/wgpu/issues/2832
2023-01-24 20:46:19 +00:00
Connor Fitzgerald
95a760bb42
Implement queue.copy_external_image_to_texture for WebGL2 and improve WebGPU Impl (#3288)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Closes https://github.com/gfx-rs/wgpu/issues/1888
2023-01-24 18:44:15 +00:00
Teodor Tanasoaia
964c94a02d
Update TextureView validation (#3410)
* update TextureView validation

* add changelog entry

* remove call to clone

* dereference instead
2023-01-24 12:02:16 +01:00
Jinlei Li
4cd753bccd
vk: improve view_formats setting (#3412)
* vk: improve view_formats setting

* Fix extension detection

* Update wgpu-hal/src/vulkan/device.rs

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>

* Follow the suggestion

* Tiny doc fix

* Follow the suggestion

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-01-23 16:02:25 +01:00
Xiaopeng Li
24a904256e
Add create_surface_from_surface_handle (#3225)
Co-authored-by: lixiaopeng.jetspark <lixiaopeng.jetspark@bytedance.com>
2023-01-19 11:16:11 -05:00
Nicolas Silva
a3e3d2503f
Update naga to 1be8024. (#3405) 2023-01-19 15:25:25 +00:00
Connor Fitzgerald
2c3f9fabb7
Allow vulkan to change view formats (#3399) 2023-01-19 14:20:15 +01:00
Elabajaba
81569dd6c3
Updated Dxc integration for DX12 backend (#3356)
Co-authored-by: unknown <alimilhim5@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/2722
closes https://github.com/gfx-rs/wgpu/pull/3147
2023-01-18 21:25:56 +00:00
Jinlei Li
0849e78600
Add view_formats in TextureDescriptor (#3237)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Closes https://github.com/gfx-rs/wgpu/issues/3030
2023-01-18 16:03:56 -05:00
Teodor Tanasoaia
fae740df5c
Fix being able to sample a depth texture with a filtering sampler (#3394) 2023-01-18 15:53:50 -05:00
Connor Fitzgerald
2ecced0c88
Improve write_buffer_with Spans (#3383) 2023-01-15 03:11:14 -05:00
Leo Kettmeir
f40611fd5c
don't panic on mapped buffer in queue_submit (#3364) 2023-01-15 07:10:11 +01:00
Jim Blandy
8c9f3f159b
queue_write_texture: Validate the destination texture. (#3378) 2023-01-14 10:35:46 +01:00
Nicolas Silva
5a2e60c50e
Update naga to e98bd92 (#3352) 2023-01-10 14:04:18 -05:00
JMS55
ad4dac87fb
Allow non-filtering integer texture sampling (#3362)
* Allow non-filtering integer texture sampling

* Add changelog entry
2023-01-09 11:08:14 +01:00
James0124
a06ef71fd7
Add validation in accordance with WebGPU GPUSamplerDescriptor valid… (#3353)
* Add validation in accordance with WebGPU `GPUSamplerDescriptor` valid usage for `lodMinClamp` and `lodMaxClamp`.

`lodMinClamp` must not be negative, and `lodMaxClamp` must be >= `lodMinClamp`

* Add changelog entry.

* Run `cargo fmt`.
2023-01-06 13:16:16 +01: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
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
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
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
5241633b3a
Implement Presentation Timestamp Correlation (#3240)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-12-20 17:52:08 +00: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
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
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
Erich Gubler
3cc6621fd3
Resolve Rust 1.66 clippy lints (#3304) 2022-12-16 17:23:12 -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
Connor Fitzgerald
3ce5ca866b
Improve dynamic offset binding errors (#3294) 2022-12-15 00:53:42 +00:00
Jim Blandy
a50836e0cb
Make wgpu-core users responsible for choosing back ends. (#3254) 2022-12-07 20:58:45 -05:00
Jim Blandy
537f077132
Evaluate gfx_select's #[cfg] conditions at the right time. (#3253)
See the comments in the code for details.
2022-12-05 12:47:42 -08:00
Kevin Reid
2209463a54
Return an error instead of panicking when canvas context is unavailable (#3052)
* Low-level error handling in canvas context creation (for WebGPU and WebGL 2).

Part of fixing #3017. This commit changes the handling of `web_sys`
errors and nulls from `expect()` to returning `Err`, but it doesn't
actually affect the public API — that will be done in the next commit.

* Breaking: Change type of `create_surface()` functions to expose canvas errors.

Part of fixing #3017.
2022-11-30 23:41:29 -05:00
Nicolas Silva
e90aacea96
Validate texture copy ranges earlier to prevent integer overflow (#3090)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-01 01:20:48 +00:00
Nicolas Silva
a9d33193b3
Fix incorrect offset in get_mapped_range (#3233)
* Add a test.

* Fix incorrect offset in get_mapped_range.

* Add an entry in the changelog.
2022-11-30 16:45:49 -05:00
Connor Fitzgerald
84cb3e65a9 Unify Surface Capabilities APIs under one function call 2022-11-27 01:50:47 -05:00
Nicolas Silva
82e9dcf8f7
Allow unspecified bits when deserializing the API's bitflags (#3229) 2022-11-25 23:13:22 -05:00
Jim Blandy
d4b1d57f3c
Move ResourceMetadata into its own module, and give it a proper interface (#3213) 2022-11-23 17:29:20 -05:00
Jim Blandy
73b23f1c8d
Move minimum supported rust version (MSRV) from 1.65 back to 1.64. (#3231) 2022-11-23 21:22:03 +00:00
Jim Blandy
f41a1c294b
Remove unnecessary mutability from ResourceMetadata field uses. (#3210) 2022-11-15 21:52:12 +00:00