Commit Graph
113 Commits
Author SHA1 Message Date
Dzmitry Malyshau 3960658529 Remove block decorations (#2292) 2021-12-15 12:29:37 -05:00
LaylandLayl Bongers 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]: https://github.com/mozilla/gecko-dev/blob/674b6582bafedc11fba6dc537769c88e9ed921d3/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
Zicklag 312828f12f Implement WebGL2 Backend (#1686)
* Implement WebGL Backend

* Add WebGL Fixes by @mrk-its

* Update Limits for WASM and Examples

* Address Review Points
2021-10-07 16:18:09 -04:00
Luke Street 76bcd9c494 Implement min_{uniform,storage}_buffer_offset_alignment limits (#1923)
* Implement min_{uniform,storage}_buffer_offset_alignment limits

* Add Limits::using_alignment

* Update docs & examples

* Create binding_model::buffer_binding_type_alignment fn
2021-09-08 13:53:02 -04:00
Dzmitry Malyshau f78061bcef Merge swap chain into surface 2021-08-11 20:58:42 -04:00
Zicklag 9310f264f1 Update Naga With New Storage Classes API (#1766) 2021-08-05 13:50:51 -04:00
Dzmitry Malyshau 552a5f138e Rename texture usage names 2021-07-28 00:17:54 -04:00
Dzmitry Malyshau 1a9a855ea9 Rename InputStepMode to VertexStepMode 2021-07-21 17:48:00 -04:00
Connor Fitzgerald 8ded21862e Fix downlevel vertex stage storage buffer check 2021-07-06 21:43:47 -04:00
Connor Fitzgerald 93cca6d182 Fix limits for rpi on vk 2021-07-03 22:15:16 -04:00
Connor Fitzgerald a336c9e160 Spell tolerance right 2021-07-02 00:13:33 -04:00
Connor Fitzgerald f76200e725 Update testing limits for rpi4 2021-07-02 00:13:33 -04:00
Dzmitry Malyshau ba006cfaa7 Rename ColorWrite, TextureUsage, and BufferUsage 2021-06-30 14:57:38 -04:00
Dzmitry Malyshau 568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
Connor Fitzgerald 3356f5f993 PR comments 2021-06-23 19:10:11 -04:00
Connor Fitzgerald f47a54009d Finish reftest and test running infra 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ec74722d57 Add image comparison to all examples 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ebbbf2216b Add image comparison to the mipmap example 2021-06-23 19:10:11 -04:00
Connor Fitzgerald aad39c7886 Fix validation issue with shadow example 2021-06-18 13:15:28 -04:00
Dzmitry Malyshau 782c72d32c hal/mtl: queue 2021-06-10 10:54:06 -04:00
Chandler Newman a267d0785d [rs] Add uniform and storage buffer arrays 2021-04-29 12:17:37 -04:00
Dzmitry Malyshau 1ada1d8d24 [rs] Update gfx and naga to gfx-22 2021-04-19 18:15:14 -04:00
Dzmitry Malyshau 756ea0e51f [rs] Update wgpu with depth clamping API changes 2021-04-05 23:27:53 -04:00
Dzmitry Malyshau 49a741a0c6 [rs] Update to gfx-19, port the water example shaders to WGSL 2021-03-30 21:36:49 -04:00
Dan Wilhelm 144bffb1a3 [rs] Refactor texture creation for shadow 2021-03-29 20:10:20 -07:00
Gordon-F 6d62cc5bc3 [rs] Update to latest wgpu, naga, gfx. 2021-03-25 21:46:35 +03:00
Joshua Groves e65ef710a5 [rs] Update to latest wgpu-{core,types} 2021-03-24 00:00:16 -02:30
bors[bot]andAron Granberg 0542ad585a [rs] Merge #798
798: Fix all the clippy lints r=kvark a=HalfVoxel

Clippy is now happy

Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2021-03-17 14:02:03 +00:00
Aron Granberg 162fe18e7d [rs] Fix all the clippy lints and add clippy/fmt CI 2021-03-17 14:40:25 +01:00
Dzmitry Malyshau 2fae02d8b2 [rs] Update naga to gfx-16 2021-03-17 09:35:54 -04:00
Dzmitry Malyshau d1d941229c [rs] Update to naga-14 2021-03-14 00:50:35 -05:00
Dzmitry Malyshau 67655976e6 [rs] Update wgpu depth_or_array_layers 2021-03-01 23:26:08 -05:00
Dzmitry Malyshau 43423f922c [rs] Update wgpu with the new vertex format 2021-02-27 22:56:47 -05:00
Dzmitry Malyshau 06b04a49e9 [rs] Update naga to gfx-11 2021-02-16 10:55:29 -05:00
Zsolt Bölöny 7a31e4e333 [rs] Convert PrimitiveState::cull_mode to Option<Face> 2021-02-11 12:59:47 +01:00
Dzmitry Malyshau 41a1c0e46f [rs] Convert cube, skybox, msaa-line, and mipmap, to WGSL
Validate example shaders in tests

Support WGSL on the Web via Naga

Port the shadow WGSL partially

Convert hello-compute and boids to WGSL

Conver the shadow's fragment shader to WGSL

Shader entry point refactor
2021-01-30 01:02:04 -05:00
Dzmitry Malyshau edb342cffe [rs] Update wgpu to the new render pipeline descriptor API 2021-01-29 00:51:44 -05:00
Connor Fitzgerald af61d9c917 [rs] Add pipeline statistics and timeline queries 2021-01-16 01:05:03 -05:00
Jay Oster 78f33bcf67 [rs] Replace futures with pollster
This PR removes all of the `futures` dependencies. `std::future` does not contain a lot of useful helpers available in futures. The obvious ones are `join_all`, `FutureExt::map`, and `block_on`.

* `join_all` is replaced with a `Vec<T>` and async blocks.
* `FuturesExt::map` in the web backend is replaced by rolling the `map` function into the `MakeSendFuture` type.
* `block_on` is provided by `pollster`.

The original code using `join_all` ignored the result type yielded by the Future from `map_async`. This code does the same, but makes dropping the result a little more obvious.

These should not be troublesome. Figured I would call them out anyway.

The last big change is replacing `futures-executor` in the examples with `async-executor`. A new concrete `Spawner` type is used in the example framework instead of an implementation of `futures_task::LocalSpawn`.
2021-01-07 10:10:18 -08:00
Emanuele Dalla Longa 0b718aea93 [rs] Require labels to match gfx-rs/wgpu#1088
Change-Id: I1acc45a3023dfc78b6694bd4a28a0131f07b7ba7
2020-12-16 00:15:05 +01:00
Dzmitry Malyshau 47f471bebb [rs] Introduce ShaderModuleDescriptor 2020-12-05 18:53:37 -05:00
kejor fe1a76dee7 [rs] API and examples update for index_format 2020-12-04 20:29:42 -05:00
Dzmitry Malyshau c9a718d689 [rs] Adopt the updated bind group entry API 2020-11-30 22:31:31 -05:00
Zsolt Bölöny 7c290fdd8d [rs] Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT 2020-11-09 10:35:55 +01:00
Dzmitry Malyshau 72ab5f2809 [rs] Update wgpu with the polygon modes support, use in the cube example 2020-09-10 22:02:05 -04:00
Rukai 3cfb3295cb [rs] Replace unsafe impl Pod with safe derive 2020-09-08 23:39:12 +10:00
Hiroaki Yutani b2ec7f360a [rs] Remove bake.frag 2020-09-01 00:22:19 +09:00
Dzmitry Malyshau 85becef23e [rs] Update wgpu with DepthComparison component and better shader validation 2020-08-28 17:37:33 -04:00