Commit Graph
19 Commits
Author SHA1 Message Date
Luca Casonato 751aa714f4 fix: zeroable buffer_get_mapped_range size
According to spec, size can be Some(0).
2021-05-06 22:03:43 -04:00
Connor Fitzgerald cf6f9c3ca8 Move from tracing to log + profiling 2021-03-17 01:22:30 -04:00
Luca Casonato 82932d1f59 chore: validate offset + size in get_mapped_range (#1266)
* chore: validate offset + size in get_mapped_range

This commit introduces out of bounds & offset validation for
buffer_get_mapped_range, like described in the WebGPU spec. See
https://gpuweb.github.io/gpuweb/#dom-gpubuffer-getmappedrange.

Closes #818

* review comments

* fmt

* fix test

* fix tests

* update error message

* review comment

* use wgt::BufferAddress

* clippy
2021-03-16 13:00:44 -04:00
Andreas Reich 52aee1a037 Better error output for player test 2021-02-03 23:44:50 +01:00
Dzmitry Malyshau f07cc8156b Update naga and gfx, move the shader validation into a shader descriptor bit 2020-12-17 11:33:47 -05:00
Dzmitry Malyshau dccc57e7b5 Switch playtests to WGSL 2020-12-06 14:51:23 -05:00
Dzmitry Malyshau 749f737c89 Add pervasive Naga support to shader module loading
The purpose of the PR is to support Naga modules everywhere.
As a requirement, it updates the gfx-rs version used.
Most of the logic is dedicated towards building a shader interface,
where previously we just used naga's IR. Now we have our own mini-IR.
2020-12-05 11:31:03 -05:00
Dzmitry Malyshau 55851add9b player: use the wgpu-cores's gfx-select macro 2020-11-26 14:47:48 -05:00
Dzmitry Malyshau c6bc37dbde [error] render bundles 2020-11-23 12:00:47 -05:00
Dzmitry Malyshau ad824de268 [error] bind groups and layouts creation 2020-11-23 11:57:32 -05:00
frbimo fdd561e69e remove PowerPreference::Default
Signed-off-by: frbimo <fr.bimo@gmail.com>
2020-10-12 19:17:44 +08:00
Dzmitry Malyshau eed8bf84ef Playtest for binding a group 2020-09-04 23:47:24 -04:00
Noah Charlton d05d1aeec1 Add Quad play test 2020-09-01 16:07:24 -04:00
Dzmitry Malyshau dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Marvin Löbel 4ed2c0a313 Replace borrowed slices in Descriptor structs with copy on write slices (#822)
* Replace &[T] in descriptor structs with Cow<[T]>

* Changed label fields to use Cow<'a, str>

* Deduplicate types across the tracing API

Introduce the ToStatic trait

* Deduplicate trace::RenderBundleDescriptor

* Remove ugly ToOwned bounds

* Simplifiy Action variants

* Make Clone bounds on type defs less verbose

* Fix a error in play.rs

* Remove ToStatic, and Make Action<'a> borrow descriptors instead
2020-07-20 12:31:05 -04:00
Gabriel Majeri ec12d9547d Error types for buffer mapping API 2020-07-20 07:22:52 +03:00
Gabriel Majeri fc460f4eab Propagate WaitIdleError up through the API 2020-07-18 20:39:11 +03:00
Dzmitry Malyshau eb7bdcd012 playtest: move the actions together with expectations 2020-07-17 10:59:02 -04:00
Dzmitry Malyshau acef9206a6 Player-based GPU test framework 2020-07-17 00:08:43 -04:00