Commit Graph

1733 Commits

Author SHA1 Message Date
bors[bot]
41f106d7fc Merge #1296
1296: Update gfx to the MSL entry point fix r=kvark a=kvark

See https://github.com/gfx-rs/gfx/pull/3705

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-31 01:26:36 +00:00
Dzmitry Malyshau
49c59ec063 Update gfx to the MSL entry point fix 2021-03-30 21:25:40 -04:00
bors[bot]
be16c7f2f2 Merge #1294
1294: Update naga to gfx-19 r=kvark a=Gordon-F

Just a naga update. Also fix https://github.com/gfx-rs/wgpu/issues/1293.

Co-authored-by: Gordon-F <ishaposhnik@icloud.com>
2021-03-30 23:34:59 +00:00
Gordon-F
7fc70bf349 Force-enable EXPERIMENTAL_TRANSLATION flag when running without cross feature 2021-03-31 02:01:43 +03:00
Gordon-F
124d5e3a7c Update naga to gfx-19 2021-03-31 02:00:48 +03:00
bors[bot]
569f87ebda Merge #1291
1291: Add color blend modes r=kvark a=cwfitzgerald

Continuation of #1289, because apparently you can't re-open an accidentally closed pull request if you force pushed...

Should be GTG.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-30 17:39:26 +00:00
Connor Fitzgerald
0616a08c65 Add color blend modes 2021-03-30 13:37:43 -04:00
bors[bot]
456525d9c7 Merge #1290
1290: Update to latest gpu-alloc r=kvark a=Gordon-F



Co-authored-by: Igor Shaposhnik <Gordon-F@users.noreply.github.com>
2021-03-29 13:38:13 +00:00
Igor Shaposhnik
6097421647 Update to latest gpu-alloc 2021-03-29 09:33:40 +00:00
bors[bot]
b7ba481a91 Merge #1282
1282: Update naga to gfx-18 r=kvark a=Gordon-F

Same as https://github.com/gfx-rs/gfx/pull/3695. Just waiting for new naga relese.

Co-authored-by: Gordon-F <ishaposhnik@icloud.com>
2021-03-25 14:01:12 +00:00
Gordon-F
c1f8203f3c Update naga to gfx-18 2021-03-25 16:59:16 +03:00
bors[bot]
e5dfafb3cc Merge #1281
1281: Rename `level_count` to `mip_level_count` r=kvark a=grovesNL

**Description**
This PR renames `level_count` to `mip_level_count` on `TextureViewDescriptor`. This follows the naming in the specification, located at https://gpuweb.github.io/gpuweb/#texture-view-creation

**Testing**
`cargo build` and `cargo test` only, naming changes will be made downstream in wgpu-rs too.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-24 14:56:00 +00:00
Joshua Groves
9885bdf320 Rename level_count to mip_level_count
This follows the naming in the specification, located at
https://gpuweb.github.io/gpuweb/#texture-view-creation
2021-03-24 09:14:30 -02:30
bors[bot]
9c98ebc48c Merge #1276
1276: Align create_swap_chain function signature r=cwfitzgerald a=kvark

**Connections**
Follow-up to #1034

**Description**
Swapchains are a bit special. Browsers don't use wgpu-core's swapchains, so we never bothered to convert them into the error model. But we still need this for Deno and webgpu-headers.

**Testing**
Untested, but also harmless

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-03-23 14:39:57 +00:00
Dzmitry Malyshau
f953266bbe Align create_swap_chain function signature 2021-03-23 10:39:13 -04:00
bors[bot]
2bc5526fbe Merge #1280
1280: Rename color/depth attachments to match spec r=kvark a=grovesNL

**Description**
- Rename `ColorAttachmentDescriptor` to `RenderPassColorAttachment` (https://gpuweb.github.io/gpuweb/#color-attachments)
- Rename `DepthStencilAttachmentDescriptor` to `RenderPassDepthStencilAttachment` (https://gpuweb.github.io/gpuweb/#depth-stencil-attachments)
- Rename `attachment` fields on both attachments to `view`

**Testing**
None (just `cargo build`) because the renaming downstream should be trivial.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-23 14:27:52 +00: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
bors[bot]
fb0288a377 Merge #1279
1279: Fix some typos r=kvark a=grovesNL

**Description**
Fix a few small typos in doc comments

**Testing**
None

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-23 06:44:11 +00:00
bors[bot]
b90199bec3 Merge #1278
1278: Rename copy views and layout to match spec r=kvark a=grovesNL

**Description**
Match the specification naming changes from https://github.com/gpuweb/gpuweb/pull/1375

**Testing**
None because the changes downstream to wgpu-rs and wgpu-native should be trivial (renaming only)

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-23 03:41:46 +00:00
Joshua Groves
306eaf3969 Fix some typos 2021-03-23 01:01:32 -02:30
Joshua Groves
9058f3ba62 Rename copy views and layout to match spec 2021-03-23 00:48:42 -02:30
bors[bot]
8dd9bd8af9 Merge #1275
1275: rows_per_image & rows_per_image are now optional r=kvark a=Wumpf

Fixes #988
Was surprisingly hard, hope it's correct; testing could be more extensive...
Ideas for more elegant handling very welcome.

**Testing**
Tested against wgpu-rs samples


Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-03-22 02:36:36 +00:00
Andreas Reich
720c73fa9c Review feedback / fix validate_linear_texture_data 2021-03-21 09:01:31 +01:00
Andreas Reich
50043875e5 rows_per_image & rows_per_image are now optional
Fixes #988
2021-03-20 12:33:28 +01:00
bors[bot]
c831c5512a Merge #1273
1273: Properly return native shader module errors to users r=kvark a=Gordon-F

**Testing**
Disable `cross` feature, break `naga` and see what happens 😄 

```log
wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
    Internal error in stage VERTEX: Error compiling the shader "\"Compilation failed: \\n\\nprogram_source:1:1: error: unknown type name \\\'sadgasdgasdgasdg\\\'\\nsadgasdgasdgasdg aasdgadsgb>\\n^\\nprogram_source:1:28: error: expected \\\';\\\' after top level declarator\\nsadgasdgasdgasdg aasdgadsgb>\\n   
```



Co-authored-by: Gordon-F <ishaposhnik@icloud.com>
2021-03-19 18:13:28 +00:00
Gordon-F
d20c0199d7 Properly return native shader module errors to users 2021-03-19 21:09:54 +03:00
bors[bot]
92936954d8 Merge #1274
1274: Update naga to gfx-17 r=kvark a=kvark

**Connections**
Includes https://github.com/gfx-rs/gfx/pull/3688

**Description**
Here comes the "gfx-17" naga train!

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-03-19 17:44:28 +00:00
Dzmitry Malyshau
c52dad9d47 Update naga to gfx-17 2021-03-19 13:43:11 -04:00
bors[bot]
ba6015e2c7 Merge #1272
1272: Add sample count to framebuffer key r=kvark a=kvark

**Connections**
Fixes #1271

**Description**
The framebuffer is created for a pass, so naturally the hashmap key for a framebuffer has to include the pass key. Otherwise, we'd be overwriting the framebuffer entry, or using a framebuffer from a different pass. The sample count was missing from our FB key.

**Testing**
Tested on a trace from #1271 that I hand-ported to latest master.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-03-17 16:15:30 +00:00
Dzmitry Malyshau
9673635125 Add sample count to framebuffer key 2021-03-17 12:13:11 -04:00
bors[bot]
bb9a5a85d2 Merge #1270
1270: Update naga to gfx-16 r=kvark a=kvark

**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3684

**Description**
Just an update

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-17 13:08:07 +00:00
Dzmitry Malyshau
b97f5a5b24 Update naga to gfx-16 2021-03-17 09:07:08 -04:00
bors[bot]
2f3b398e38 Merge #1268
1268: Move from `tracing` to `log` + `profiling` r=kvark a=cwfitzgerald

**Connections**

Fixes #1211. Fixes #1189.

**Description**

Moves from `tracing` to `log` + `profiling`. I also removed some of the offending spans that were only for pushing commands onto a vector of commands.

**Testing**

Tested on wgpu-rs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-17 05:30:36 +00:00
Connor Fitzgerald
cf6f9c3ca8 Move from tracing to log + profiling 2021-03-17 01:22:30 -04:00
bors[bot]
5d993efc85 Merge #1267
1267: Update naga to gfx-15 r=kvark a=kvark

**Connections**
Fixes #1228 (huge DX12 leak in command allocation)
Includes https://github.com/gfx-rs/gfx/pull/3676, https://github.com/gfx-rs/gfx/pull/3679, https://github.com/gfx-rs/gfx/pull/3680, https://github.com/gfx-rs/gfx/pull/3681, and the relevant Naga stuff.

**Description**
Updates Naga and gfx.

**Testing**
Tested on wgpu-rs examplse

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-16 17:07:20 +00: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
3b1b11f441 Update naga to gfx-15 2021-03-16 12:52:32 -04:00
Wumpf
717c2d73e7 Add CONSERVATIVE_RASTERIZATION native feature (#1263)
* Add CONSERVATIVE_RASTERIZATION native feature

* update gfx to cd3042d8c02d9dc7fc74ac8c292099c9789f6d43

* error for polygon mode not fill +conservative raster
2021-03-14 20:43:02 -04:00
bors[bot]
5e15980bb5 Merge #1262
1262: Update to naga-14 r=kvark a=kvark

**Connections**
Depends on https://github.com/gfx-rs/naga/pull/552 and https://github.com/gfx-rs/gfx/pull/3675

**Description**
Just an update of Naga

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-14 05:28:46 +00:00
Dzmitry Malyshau
280c066e65 Update to naga-14 2021-03-14 00:27:57 -05:00
bors[bot]
7af0f3137d Merge #1258
1258: Lint all the things r=kvark a=kvark

**Connections**
Fixes #1250

**Description**
Refactors the code to satisfy the linter, configures it, and enables on CI.

**Testing**
`cargo clippy` saves the dau

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-12 17:40:57 +00:00
Dzmitry Malyshau
231bba03a1 Lint all the things 2021-03-12 12:39:04 -05:00
bors[bot]
763c14a6d9 Merge #1254
1254: Fix swapchain resize in the player r=kvark a=kvark

**Connections**
Fixes 1253

**Description**
I was fixing this recently, and I'm not sure how it worked, because there is a big inner `loop` that I didn't notice before 😅 .
So now we exit the inner loop upon resize.

**Testing**
Tested on the supplied API trace

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 20:37:37 +00:00
Dzmitry Malyshau
eef4a75454 Fix swapchain resize in the player 2021-03-10 15:34:21 -05:00
bors[bot]
0fa52d3826 Merge #1252
1252: Fix Vulkan Portability check r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 05:23:59 +00:00
Dzmitry Malyshau
80fe0d8fdd Fix Vulkan Portability check 2021-03-10 00:23:09 -05:00
Anthony Cowley
f01feacc2e Update gfx and naga to gfx-13 tag (#1248)
* wgpu-core: update gfx-hal usage related to sparse resources

* wgpu-core: support naga gfx-13

* Update gfx and naga dependencies to gfx-13 tag

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 00:04:16 -05:00
bors[bot]
6f49f041d3 Merge #1251
1251: Don't panic on pipeline creation errors r=kvark a=kvark

**Connections**
Related to Gecko crashes.

**Description**
We shouldn't ever panic in `wgpu`. The panic can only occur if there is internal inconsistency. For any invalid workloads, submitted by the user, we should produce errors instead.

**Testing**
Not tested

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 03:29:52 +00:00
Dzmitry Malyshau
4f7cd45ea7 Don't panic on pipeline creation errors 2021-03-09 22:24:57 -05:00
bors[bot]
37dbe5e32e Merge #1247
1247: Add license to the memory init tracker r=kvark a=kvark

**Connections**
Gecko's code lints complain...

**Description**
Add a license header like all the other files

**Testing**
should work!

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-03-04 15:43:42 +00:00