Commit Graph
295 Commits
Author SHA1 Message Date
bors[bot]andAron Granberg 5c249c4375 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 f78ccfe09e Fix all the clippy lints and add clippy/fmt CI 2021-03-17 14:40:25 +01:00
bors[bot]andConnor Fitzgerald a7e03546c1 Merge #797
797: Move from `tracing` to `log` + `profiling` r=kvark a=cwfitzgerald

Continuation of https://github.com/gfx-rs/wgpu/pull/1268 into wgpu-rs

This also includes the naga gfx-15 train.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-17 13:17:03 +00:00
Aron Granberg 50fdd1e599 Fix excessive buffer padding (#795)
* Fix excessive buffer padding

* Prettify

* cargo fmt

* Simplify code

* Style
2021-03-17 09:09:58 -04:00
Connor Fitzgerald 0b010163cc Move from tracing to log + profiling 2021-03-17 01:34:38 -04:00
Dzmitry Malyshau 0cccf9ccee Update to naga-14 2021-03-14 00:50:35 -05:00
Dzmitry Malyshau ebd1f8d32e Update to naga-13 2021-03-10 00:41:04 -05:00
Connor Fitzgerald bfeab73eeb Mark BufferMappedRange Send/Sync on native 2021-03-04 00:04:51 -05:00
bors[bot]andOleg Andreev ae7b47784b Merge #778
778: Return None from get_swap_chain_preferred_format if the adapter does not support the surface r=kvark a=OlegOAndreev

Fixes #777 

Almost every other method in wgpu panics on failure, so I decided to make the return value an `Option<TextureFormat>`, not a `Result<Option<TextureFormat>>`

Co-authored-by: Oleg Andreev <ooandreev@yandex-team.ru>
2021-03-02 04:36:08 +00:00
Dzmitry Malyshau d4ec1157f0 Update wgpu depth_or_array_layers 2021-03-01 23:26:08 -05:00
Oleg Andreev c9a7fe75d4 Return None from get_swap_chain_preferred_format if the adapter does not support the surface. 2021-03-01 18:15:01 +03:00
Dzmitry Malyshau 6d39d8f739 Update wgpu with the new vertex format 2021-02-27 22:56:47 -05:00
Andreas Reich b4859d3ecf panic on empty buffer slice
Fixes #735
2021-02-25 09:59:17 +01:00
Ashley a86612e4ef Fix create_texture_with_data for 3d textures (#771)
* Fix create_texture_with_data for 3d textures

* Remove depth_per_iteration variable
2021-02-22 12:19:57 -05:00
Dzmitry Malyshau 7fc75c4ec7 Update naga to gfx-12 2021-02-21 12:07:26 -05:00
Dzmitry Malyshau 60fe95205a Blend state API update 2021-02-19 16:16:19 -05:00
Dzmitry Malyshau e733e17e49 Update naga to gfx-11 2021-02-16 10:55:29 -05:00
Chris aeec413452 Correct FragmentState targets comment 2021-02-12 04:29:06 +01:00
bors[bot]andLachlan Sneff 229dbb3491 Merge #755
755: Add Instance::poll_all r=kvark a=lachlansneff

`Instance::poll_all` polls all devices. This will be useful for integrating into the winit event loop from a third-party crate.


Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2021-02-11 15:52:26 +00:00
Zsolt Bölöny 66b9633cf8 Convert PrimitiveState::cull_mode to Option<Face> 2021-02-11 12:59:47 +01:00
Lachlan Sneff c233c33cd0 Add Instance::poll_all 2021-02-10 02:15:18 -05:00
Imbris fadb730a01 Expose missing constants from wgpu-types 2021-02-07 15:08:17 -05:00
Jonathan Behrens b17cb30f17 Implement read_buffer utility function 2021-02-06 11:22:37 -05:00
Dzmitry Malyshau 91fca7c5c3 Experimental ReadBuffer structure 2021-02-05 12:59:49 -05:00
Dzmitry Malyshau 7235072f6d Update version and dependencies to gfx-9 2021-02-01 02:16:31 -05:00
Dzmitry Malyshau 74eed253d8 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 517ce3ef8d Update wgpu to the new render pipeline descriptor API 2021-01-29 00:51:44 -05:00
Dzmitry Malyshau c1225c42ac Fix the web backend in code and CI 2021-01-26 20:58:13 -05:00
Matt Keeter 2d16ade76c Bump wgpu-core and update texture_view_drop call 2021-01-23 12:12:42 -05:00
Dzmitry Malyshau ba99775974 Remove typed-arena dependency 2021-01-19 22:01:54 -05:00
Connor Fitzgerald 6d52bc5535 Add pipeline statistics and timeline queries 2021-01-16 01:05:03 -05:00
Andreas Reich 5ad4f19cea Exposed get_texture_format_features on adapter 2021-01-13 23:23:44 +01:00
Mikko Lehtonen a6cc17c12e Format PassErrorScope pipelines 2021-01-12 23:32:10 +02:00
Niklas Korz 0578cda7a6 Move get_swap_chain_preferred_format from device to adapter
Squashed commit of the following:

commit 260976b10e3a54b253768d71e5e47c51b976c25c
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 20:23:31 2021 +0100

    Formatting

commit e3f837e1b6a81c8c7a9566ba6a2c6dd8adfbbde7
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 20:20:37 2021 +0100

    Update examples

commit b0774c0aa56fbdfe741dd6c0e86d55b8c6b42de3
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 19:31:29 2021 +0100

    Use adapter.get_swap_chain_preferred_format
2021-01-11 20:32:03 +01:00
Jay Oster dae801baa0 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
Manuel Gil 80d8526c83 Fix cargo doc warnings due to unresolved links 2021-01-06 18:30:24 +00:00
Manuel Gil e00ef5d584 Expose get_swap_chain_preferred_format on Device
- Update examples to make use of the new method
2021-01-03 17:35:04 +00:00
0x182d4454fb211940 a7c87edaef Add set_push_constants to RenderEncoder 2020-12-25 14:01:04 +00:00
0x182d4454fb211940 fb5a449206 Remove unneeded cast from encoder.rs 2020-12-25 13:50:36 +00:00
0x182d4454fb211940 a99411c290 Move RenderEncoder to util 2020-12-25 13:47:38 +00:00
0x182d4454fb211940 1490d7be3a Add RenderEncoder 2020-12-24 17:37:06 +00:00
Vincent Jousse a717eeb54f First step for WebGL support. 2020-12-22 18:41:07 +01:00
Dzmitry Malyshau 0011ac4f26 Expose adapter.get_info() everywhere 2020-12-18 21:18:07 -05:00
Dzmitry Malyshau 3ffb82b7d3 Move DeviceExt into a separate module 2020-12-17 17:55:11 -05:00
Dzmitry Malyshau f3d6d242d7 Update wgpu with Naga fixes and OpenGL backend 2020-12-17 13:03:27 -05:00
Emanuele Dalla Longa bdd6edecd2 Require labels to match gfx-rs/wgpu#1088
Change-Id: I1acc45a3023dfc78b6694bd4a28a0131f07b7ba7
2020-12-16 00:15:05 +01:00
Zsolt Bölöny b7ea3f3b4a Update to latest wgpu master 2020-12-14 17:57:27 +01:00
Connor Fitzgerald a4202a4ff0 Add create_texture_with_data helper 2020-12-12 01:50:49 -05:00
Mikko Lehtonen 28931e34cc Add label to create_shader_module 2020-12-08 22:56:17 +02:00
Dzmitry Malyshau 7b06c4a3f7 Introduce ShaderModuleDescriptor 2020-12-05 18:53:37 -05:00