Commit Graph

77 Commits

Author SHA1 Message Date
Nicolas Silva
ff306d20e0 Add support for bgra8unorm-storage (#4228)
* Add `BGRA8UNORM_STORAGE` extension

* Leave a comment in the backends that don't support bgra8unorm-storage

* Pass the appropriate storage format to naga

* Check for bgra8unorm storage support in the vulkan backend

* Add a test

Co-authored-by: Jinlei Li <jinleili0@outlook.com>
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-10-13 10:07:11 +00:00
Nicolas Silva
f95d1c55e3 Expose Instance flags (#4230)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-11 17:39:04 +00:00
Nicolas Silva
198e1dfadc Validate that resources belong to the right device. (#4207) 2023-10-04 14:39:03 -04:00
Leo Kettmeir
d0a7f46e3a update deno and spec (#4143)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-04 04:25:56 +00:00
Aaron Hill
2b4a8b318f wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 (#4116)
* wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12

This error only exists due to an issue with naga's HLSL support:
https://github.com/gfx-rs/naga/issues/1945
The WGPU spec itself allows vertex shader outputs that are
not consumed by the fragment shader.

Until the issue is fixed, we can allow unconsumed outputs on
all platforms other than DX11/DX12.

* Add Features::SHADER_UNUSED_VERTEX_OUTPUT to allow disabling check

* Pick an unused feature id
2023-09-20 21:02:37 -04:00
Pieter-Jan Briers
e973a06268 Allow specifying minor GLES3 version (#3998) 2023-08-16 11:51:56 -04:00
Christopher Fleetwood
3305e88d63 feature: Timestamp queries (#3636)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-08-02 18:04:24 -04:00
Valaphee The Meerkat
494ae1a815 Add support for occlusion queries (#3402)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-08-02 19:05:59 +00:00
Leo Kettmeir
0ece5e6119 update deno (#3808) 2023-06-06 17:08:32 +02:00
Connor Fitzgerald
4aff9b67af Allow workspace to be built on wasm (#3840) 2023-06-06 06:58:20 -04:00
Jim Blandy
29914b308f wgpu-core: Move identity code to new identity module. 2023-05-24 09:54:03 -07:00
Jim Blandy
f00e6b70ea wgpu-core: Move Global to new global module. 2023-05-24 09:54:03 -07:00
Jinlei Li
62ea7813e4 Implement Features::RG11B10UFLOAT_RENDERABLE (#3701) 2023-04-19 13:34:29 +02:00
Connor Fitzgerald
0c3ca5c08b Fix Metal Mipmap Behvior (#3610) 2023-03-21 16:37:30 +00:00
Teodor Tanasoaia
287c6e6b47 Update deno (#3562)
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2023-03-11 01:24:20 -05:00
Teodor Tanasoaia
cf40e64b16 Change type of bytes_per_row and rows_per_image (#3529) 2023-03-06 16:44:36 -05:00
Leo Kettmeir
710fc553d5 fix(deno): cleanup resources when closed (#3530) 2023-03-03 12:18:01 -05:00
Teodor Tanasoaia
ac689cbe1f Update feature documentation (#3534) 2023-03-03 12:09:17 -05:00
Leo Kettmeir
ea2f20ccb0 fix(deno): don't default to 0 for setVertexBuffer.size & properly use webidl.setlike (#3493) 2023-02-17 12:06:30 -05:00
daxpedda
e4445205c2 Remove emscripten crate features (#3467) 2023-02-15 21:46:00 +00:00
Leo Kettmeir
bb01d723ba fix(deno): use correct op for GPUDevice.createSampler (#3480) 2023-02-11 01:29:07 +01:00
Teodor Tanasoaia
41de797c74 Change type of mip_level_count and array_layer_count (members of TextureViewDescriptor and ImageSubresourceRange) from Option<NonZeroU32> to Option<u32> (#3445)
Clean up duplicated code related to texture layers/mips.
2023-02-03 15:03:34 +01:00
Leo Kettmeir
e36c080ef8 fix(deno): specify viewFormats in configure surface (#3446) 2023-02-02 22:14:31 +01:00
Elabajaba
c5e2f5a7b9 Add SHADERINT_16 feature to allow 16bit ints in Vulkan shaders (#3401)
* add support for vulkan SHADER_INT16

* changelog

* deno shader-i16

* better INT16 docs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* fix typo

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-02-02 02:00:22 +00: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
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
Leo Kettmeir
608d86385a deno fixes (#3384) 2023-01-16 18:23:52 +01:00
Leo Kettmeir
b39c0b9de1 update deno (#3379)
* update deno

* update spec

* remove unrelated changes
2023-01-14 17:07:46 +01:00
Leo Kettmeir
2252b1209a feat(deno): surface support (#3265) 2023-01-09 16:44:20 +01:00
Jim Blandy
a50836e0cb Make wgpu-core users responsible for choosing back ends. (#3254) 2022-12-07 20:58:45 -05:00
Leo Kettmeir
9cc0ff1cd5 chore: update deno (#3258)
* update deno
* bump ver
2022-12-03 09:35:10 -08:00
Erich Gubler
18f3f5f6f0 Enable unsafe_ops_in_unsafe_fn lint in all workspaces (#3044) 2022-11-14 10:49:39 -08:00
Jim Blandy
9fb9dbf653 deno_webgpu: Don't confuse zero with "to the end of the buffer".
`RenderBundleEncoder::set_index_buffer` and `set_vertex_buffer`
interpret a `size` of `None` to mean "from the given offset to the end
of the buffer", but `std::num::NonZeroU64::new` produces `None` when
its argument is zero, which is quite different. Fix this similarly to
the way it's handled in `op_webgpu_render_pass_set_index_buffer`.

The WebGPU spec says this should work; filed as #3170.
2022-11-03 09:14:18 -07:00
Jinlei Li
cc448817e7 Use cargo 1.64 workspace inheritance feature (#3107) 2022-10-20 01:41:17 -04:00
Nicolas Silva
d1ff3838b8 Expose the full Result type to the rust map_async callback (#2939) 2022-10-13 15:41:52 -04:00
daxpedda
02cc2ae234 [BREAKING] Make Shader(Module)Source::Wgsl optional (#2890) 2022-10-08 01:12:50 -04:00
Leo Kettmeir
f8ff5a8ffa Update deno (#3041) 2022-09-20 12:06:12 -04:00
Leo Kettmeir
03b989c235 Upstream denoland/deno#15853 (#3038)
Co-authored-by: Vicary A <vicary@yahoo.com>
2022-09-20 02:54:25 +00:00
Jim Blandy
701564da8c Use () instead of PhantomData as IdentityManager's Input type. (#2972)
* Use () instead of PhantomData as IdentityManager's Input type.

PhantomData suggests that there's some sort of persuasion required
for lifetime variance inference or other sorts of arcana, but it
doesn't seem to be necessary at all. `()` works just fine.
2022-09-02 15:37:21 -07:00
Jim Blandy
d655017439 Implement "strict_asserts" feature in wgpu-core. (#2872)
Since `wgpu-core`'s public functions are supposed to validate their
parameters, the internal `track` module skips many of Rust's usual
run-time checks in release builds. However, some `wgpu-core` users are
happy to pay the performance cost in exchange for more safety. The
`"strict_asserts"` feature causes `wgpu_core` to perform the same
checks in release builds as it does in debug builds.
2022-08-08 00:45:39 -04:00
Leo Kettmeir
aae8c6aaec update deno (#2901) 2022-07-25 23:31:58 -04:00
Leo Kettmeir
534ad76d5a upstream deno changes (#2895)
* upstream GPUAutoLayoutMode

* clean up symbols and fix miscalled op

* fix gfx-rs/wgpu#2778
2022-07-20 12:47:10 -04:00
Connor Fitzgerald
ea05b44f38 Improve Presentation Api (#2803)
* Add new presentation modes

* Expand presentation formats

* Add Surface::get_supported_modes

* Update to rust 2021 and improve some metal surface code

* Update wgpu-types/src/lib.rs

Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>

* Fix windows build errors

* Fix issues with ALLOW_TEARING

Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2022-06-30 14:24:17 -04:00
Jinlei Li
61796b1d59 Relax render pass color_attachments validation (#2778)
* Make the color attachments `Option`-al in render pipelines, render passes, and render bundles

* vk:  `Option`-al color attachments support

* dx12: sparse color_attachments support

* Only non-hole attachments is supported on wasm target and gl backend

* deno_webgpu: `Option`-al color attachments support

* Follow all suggestions
2022-06-27 16:10:18 -07:00
Connor Fitzgerald
5bd0a6c4ac Implement submission indexes (#2700)
* Implement submission indexes

* Write some unit tests for poll

* Update wgpu/src/lib.rs

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

* Unify Maintain in both wgc and wgpu

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-06-05 17:22:25 -04:00
Connor Fitzgerald
32af4f5607 Convert map_async from being async to being callback based (#2698) 2022-05-31 11:22:21 -04:00
Jinlei Li
8063edc648 Add DEPTH24UNORM_STENCIL8 feature (#2689) 2022-05-30 15:29:12 -04:00
Leo Kettmeir
dd6febe309 Update deno (#2691)
* update deno crates & align to IDL

* revert GPUAutoLayoutMode

* revert GPUAutoLayoutMode
2022-05-24 00:01:19 -07:00
Jinlei Li
26f96c7dfe Add DEPTH32FLOAT_STENCIL8 featue (#2664) 2022-05-17 02:11:05 -04:00