Commit Graph

137 Commits

Author SHA1 Message Date
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
Jinlei Li
ddf1903b03
Add SHADER_FLOAT16 feature (#2646)
* Add SHADER_FLOAT16 feature

* vk: check SHADER_FLOAT16 feature
2022-05-12 22:14:19 -07:00
xiaopengli89
3f3af605db Return queue_empty for Device::poll 2022-05-10 16:35:56 -07:00
Connor Fitzgerald
e54a36ee78
Move texture-array example over to wgsl (#2618) 2022-04-25 18:32:53 +00:00
Jinlei Li
5706263917 Rename dispatch -> dispatch_workgroups 2022-04-20 23:24:21 -07:00
Leo Kettmeir
b52d68d5ad
deno: custom op arity (#2542) 2022-03-24 13:20:10 -04:00
Leo Kettmeir
cd6eb2db36
Merge pull request #2539 from crowlKats/update_deno
Update deno_webgpu
2022-03-18 22:31:10 -07:00
Leo Kettmeir
72c710e11d
deno: pull changes from deno repo (#2455)
* pull deno changes

* update copyright header

* fix cargo
2022-02-04 19:31:46 +00:00
Leo Kettmeir
e903a2b2dc
full errors (#2454) 2022-02-04 14:09:25 -05:00
Leo Kettmeir
e50b62fae4
dont panic when submitting same commandbuffer multiple times (#2449) 2022-02-02 08:52:08 -05:00
Leo Kettmeir
23fab7ab0a
clean up features in deno (#2445) 2022-02-01 18:06:07 -05:00
Aaron O'Mullan
cdd480a89c
lint: deno_webgpu & wgpu-core (#2403) 2022-01-18 09:34:10 -05:00
Aaron O'Mullan
6b60037a6a
chore(deno_webgpu): bump deno crates (#2405)
* chore(deno_webgpu): bump deno_core to 0.114.0

ca75752e5a dates back to Aug 30 2021, so is nearly 5 months old.

There are no breaking changes updating `deno_core` to `0.114.0` (released 6 days ago)

Also by using the crate directly from cargo we avoid cloning https://github.com/denoland/deno and https://github.com/denoland/deno_third_party which can be quite large so crate DL/install is much faster

* bump cts_runner's deno crates

* minor cts_runner fixes
2022-01-18 09:30:41 -05:00
Wumpf
2fa75aaf05
Do texture init via clear passes when possible (#2307)
* CLEAR_COMMANDS extension is now more of a window into wgpu zero-init
this has mostly implications on the constraints, but also allows a more leaky documentation which makes sense for this non-standard function as there is no other place to look it up

* clear_texture via renderpasses wip

* 3D depth textures are no longer allowed, volumes are always cleared via CPY_DST

* cleanup texture's clear_views

* rename CLEAR_COMMANDS to CLEAR_TEXTURE

* separate clear_texture into reusable & more descriptive parts

* texture clear views are now created ahead of time

* discarded surface fixup goes through new clear_texture method now

* onq ueue texture initialization now goes threw clear_texture
pending inits need to store Stored textures now though, causing more ref count bumping

* texture init on queue_write_texture now also goes through new clear_texture

* transfer functions on commandbuffer use now new texture init route

* merge collect_zero_buffer_copies_for_clear_texture into clear_texture_via_buffer_copies

* clear functions now take TextureInitRange

* Fix clippy lints

* command_encoder_clear_texture no longer takes write lock on texture

* TextureClearMode encodes now is_color

* code cleanup, mostly about `use`

* Handle volume textures in clear_texture_via_render_passes properly

* texture clear no longer requires id::Stored

* init tracking fixes for volumes and init on partial subresource writes

* texture creation enforces COPY_DST only if absolutely necessary

* unrolled functional chain, reduce unsafe scope size

* fix clippy lints

* clear_texture test no longer creates 1D textures

see #2323

* 3D textures are no longer cleared as render target since this isn't supported on Metal

* fix deno building issue, fix formatting

* TextureInner::Surface can now be zero initialized
2021-12-28 17:05:53 -05:00
Dzmitry Malyshau
cdf948b920 Fix and re-enable player tests 2021-12-03 17:11:26 -05:00
Dzmitry Malyshau
6372aad845 Rename fill_buffer back to clear_buffer 2021-12-02 12:33:59 -05:00
Leo Kettmeir
cda893fe73
feat(deno_webgpu): fill buffer (#2221)
* fill buffer

* fix

* fmt
2021-11-28 21:22:15 -05:00
Leo Kettmeir
943145b4df
chore: update deno_webgpu (#2214)
* update deno

* more fixes

* revert debug

* clean
2021-11-26 16:05:16 -05:00
Layl
2ef72b9313
Add multiview support (#2187)
Co-authored-by: Layl Bongers <2385329-layl@users.noreply.gitlab.com>
2021-11-19 10:56:48 -05:00
Boris-Chengbiao Zhou
3545a4fdd5
Introduce SamplerBindingType enum and fix bug in validation (#2181)
* Introduce SamplerBindingType enum and fix bug in validation

This matches the WebGPU spec more closely and also lets us implement the
validation as it's written in the spec[1]. This fixes a bug which
previously prevented the "shadow" example from running in Firefox.

Previously the validation would check whether the filtering was
appropiate even if it was a comparison sampler. This didn't matter when
running the shadow example natively since the example was setting
`filtering: true` in addition to `comparison: true`. But this failed
when running through a browser since there the used WebIDL has the
proper enum representation and eventually resulted in `filtering: false`
being passed to wgpu-core which would then fail validation.[2]

[1]: https://gpuweb.github.io/gpuweb/#bind-group-creation
[2]: 674b6582ba/dom/webgpu/ipc/WebGPUChild.cpp (L502-L513)

* Fix remaining examples

* Fix deno_webgpu
2021-11-16 23:08:03 -05:00
Dzmitry Malyshau
f25a45f4e2
Evolve depth clamping into clip control (#2171) 2021-11-10 16:55:27 -05:00
crowlkats
14092fff94
op cleanup 2021-10-08 07:34:15 +02:00
Dzmitry Malyshau
1ee6036f44 Implement software adapter selection 2021-10-01 17:22:51 -04:00
Dzmitry Malyshau
96ed52f4a7 Check Deno build on CI 2021-09-28 11:43:43 -04:00
Connor Fitzgerald
7766ed194b
Improve CI testing code 2021-09-14 13:34:07 -04:00
Dzmitry Malyshau
a7c7c9f38e Move Deno out of the workspace 2021-09-13 23:57:33 -04:00
Dzmitry Malyshau
bbb9968297 Enable WebGPU CTS on CI 2021-09-09 22:21:04 -04:00
Luca Casonato
d5ba0b439d
WIP: add cts_runner and deno_webgpu crate (#1859)
* WIP: add cts_runner and deno_webgpu crate

* add test

* remove Cargo.lock

* review comment

* simplify

* fix bugs

* improve cts_runner to work with crowlKats/webgpu-examples

* fix

* remove build.rs

cts_runner binaries are now not portable anymore.

Also startup will now print a bunch of cargo:rerun-if-changed=. This
will be fixed in deno_core.

* remove d.ts

* add original deno license file
2021-09-03 13:23:35 -04:00