Commit Graph

140 Commits

Author SHA1 Message Date
Dzmitry Malyshau
569cd0cdd6 WIP new wgpu-hal 2021-06-08 00:46:08 -04:00
Andreas Reich
99e691932d add clear buffer/image to wgpu-rs api 2021-06-05 11:49:13 +02:00
Wumpf
f62d0d5edc
Native Extension: Expose fill buffer & clear image (#1335)
* Add command buffer fill buffer method

* Added test for buffer fill

* Added image clear + test

* image/buffer clear methods are now pure clear to zero

* fix cargo clippy & int type issues

* clear buffer alignment is now given by COPY_BUFFER_ALIGNMENT

* joined buffer/image clear player tests

* ImageSubresourceRange is now used in TextureViewDescriptor
2021-05-30 11:03:33 -04:00
Dzmitry Malyshau
19dfcd93ca Make player automatically start/stop the capture 2021-05-18 17:42:49 -04:00
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
Dzmitry Malyshau
bc4c5c8f03 Change error type for the backend shader 2021-04-21 17:06:58 -04:00
Dzmitry Malyshau
de86f2a72f Mark unused implicit BGL ids as vacant 2021-04-19 23:35:33 -04:00
Dzmitry Malyshau
27f51ca252 Update naga to gfx-22, add interpolation sampling validation 2021-04-19 13:33:36 -04:00
adamnemecek
af8b94c729 removed autocapture 2021-04-02 09:43:38 -07:00
Dzmitry Malyshau
f953266bbe Align create_swap_chain function signature 2021-03-23 10:39:13 -04:00
Joshua Groves
a5693ab2a3 Rename color/depth attachments to match spec
- Rename `ColorAttachmentDescriptor` to `RenderPassColorAttachment`
- Rename `DepthStencilAttachmentDescriptor` to `RenderPassDepthStencilAttachment`
- Rename `attachment` fields on both attachments to `view`
2021-03-23 09:31:59 -02:30
Andreas Reich
50043875e5 rows_per_image & rows_per_image are now optional
Fixes #988
2021-03-20 12:33:28 +01:00
Dzmitry Malyshau
b97f5a5b24 Update naga to gfx-16 2021-03-17 09:07:08 -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
Dzmitry Malyshau
280c066e65 Update to naga-14 2021-03-14 00:27:57 -05:00
Dzmitry Malyshau
eef4a75454 Fix swapchain resize in the player 2021-03-10 15:34:21 -05:00
Dzmitry Malyshau
10245cece9 Early tracing of swapchain-related things, clean up the hub API 2021-03-03 19:59:29 -05:00
Dzmitry Malyshau
7c1db12cdc Refactor implicit BGLs to support early tracing 2021-03-03 16:48:23 -05:00
Dzmitry Malyshau
103e7763a3 Rename depth to depth_or_array_layers 2021-03-01 11:08:17 -05:00
Dzmitry Malyshau
91f5329b33 Update gfx and naga to gfx-12 2021-02-21 11:25:45 -05:00
Dzmitry Malyshau
b3387492a2 Handle player window resizing gracefully 2021-02-11 14:16:56 -05:00
Andreas Reich
fd810f839e merged buffer-zero-init-for-binding and buffer-zero-init-for-mapping-and-writing tests 2021-02-06 12:09:38 +01:00
Andreas Reich
52aee1a037 Better error output for player test 2021-02-03 23:44:50 +01:00
Andreas Reich
5e488d4fea Added player test with compute shader reading & writing an uninitialized buffer 2021-02-03 23:44:42 +01:00
bors[bot]
7c7501cab7
Merge #1182
1182: Update all versions r=kvark a=kvark

**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3620 and a bunch of other fixes in gfx-rs and naga.

**Description**
Updates the dependencies ("gfx-9" naga train) as well as self version to 0.7, to match the v0.7 branch.

**Testing**
Should just work :)

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-01 05:37:39 +00:00
Dzmitry Malyshau
8ed543f26a Update all versions 2021-02-01 00:35:40 -05:00
Andreas Reich
cc183c885f Added player test for buffer-zero-init 2021-01-31 21:56:31 +01:00
Dzmitry Malyshau
0346b43982 Update the render pipeline API 2021-01-27 15:09:13 -05:00
Dzmitry Malyshau
05bb482e49 Fix replaying issues with dropped texture views 2021-01-19 22:03:55 -05:00
bors[bot]
4f2d0bb8c8
Merge #1151
1151: Update gfx and naga to gfx-6 tag r=cwfitzgerald a=kvark

**Connections**
Fixes #1149 
Regression from https://github.com/gfx-rs/gfx/pull/3573

**Description**
The physical devices held references to `RawInstance` in Vulkan backend, and we weren't cleaning them up.
Note: an alternative fix could be in `gfx-backend-vulkan` - to move the `Entry` into `RawInstance`, thus delaying the shutdown. I didn't go this way because that would be less explicit.

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-01-16 06:39:44 +00:00
Dzmitry Malyshau
87c8cb8fde Update gfx and naga to gfx-6 tag, fix the hub clears 2021-01-16 01:38:57 -05:00
Connor Fitzgerald
a22037ced0 Add pipeline statistics and timeline queries 2021-01-16 00:48:54 -05:00
Dzmitry Malyshau
6c05470db0 Minor dependencies bumps 2021-01-15 01:11:28 -05:00
bors[bot]
89e585af61
Merge #1093
1093: Update naga and gfx, move the shader validation into a shader descriptor bit r=cwfitzgerald a=kvark

**Connections**
Includes https://github.com/gfx-rs/gfx/pull/3533 and a bunch of Naga things.

**Description**
Updates Naga with the new WGSL syntax, lots of fixes.
Large update of the GL backend.

**Testing**
Tested on some wgpu-rs examples.

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2020-12-17 16:34:28 +00: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
b84301110c Optimize submit() for no command buffers 2020-12-16 15:02:09 -05:00
Dzmitry Malyshau
a316fff427 Update Naga to gfx-4, update gfx with GL fixes 2020-12-07 01:30:52 -05:00
Dzmitry Malyshau
3f33434c6f Enable experimental translation to playtests 2020-12-06 15:14:14 -05:00
Dzmitry Malyshau
dccc57e7b5 Switch playtests to WGSL 2020-12-06 14:51:23 -05:00
bors[bot]
d430e044b5
Merge #1076
1076: Fix player warnings r=kvark a=kvark

```
warning: unused `std::result::Result` that must be used
   --> player/src/bin/play.rs:142:29
    |
142 | ...                   gfx_select!(device => global.device_create_swap_chain(device, surface, &desc));
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused `std::result::Result` that must be used
   --> player/src/bin/play.rs:147:29
    |
147 | ...                   gfx_select!(device => global.swap_chain_present(id));
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused `std::result::Result` that must be used
   --> player/src/bin/play.rs:173:21
    |
173 |                     gfx_select!(device => global.device_poll(device, true));
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: 3 warnings emitted
```

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-05 23:56:38 +00:00
Dzmitry Malyshau
91a66b4b4a Fix player warnings 2020-12-05 18:55:27 -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
kejor
4513fb2b83 Match upstream API changes for IndexFormat 2020-12-01 19:19:41 -05:00
Dzmitry Malyshau
9e2f6c2f01 Move to gfx master 2020-11-30 22:50:13 -05:00
Dzmitry Malyshau
5949dec61d Update bind group layout API to match upstream 2020-11-28 00:30:27 -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
6307294e2b [error] pipeline creation 2020-11-23 11:57:32 -05:00
Dzmitry Malyshau
ad824de268 [error] bind groups and layouts creation 2020-11-23 11:57:32 -05:00