Commit Graph
788 Commits
Author SHA1 Message Date
bors[bot]andDzmitry Malyshau b3efd07b20 Merge #786
786: Update to naga-13 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 05:41:35 +00:00
Dzmitry Malyshau ebd1f8d32e Update to naga-13 2021-03-10 00:41:04 -05:00
bors[bot]andConnor Fitzgerald cadc2df8a1 Merge #781
781: Mark BufferMappedRange Send/Sync on native r=kvark a=cwfitzgerald

This fixes an issue reported on the matrix where this was causing things to unnecessarily be !Send. There's no reason I can see that this couldn't be Send/Sync as we only use it like one would a slice. We might also consider backporting this to 0.7.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-04 05:11:32 +00: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
bors[bot]andDzmitry Malyshau 70d7850795 Merge #779
779: Update wgpu depth_or_array_layers r=kvark a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1241

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-02 04:26:42 +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
bors[bot]andDzmitry Malyshau fd4a992533 Merge #776
776: Update wgpu with the new vertex format r=kvark a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1235

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-28 03:57:40 +00:00
Dzmitry Malyshau 6d39d8f739 Update wgpu with the new vertex format 2021-02-27 22:56:47 -05:00
bors[bot]andAndreas Reich 1509128f6d Merge #773
773: Panic on empty buffer slices r=kvark a=Wumpf

Fixes #735 
Can't really pass through zero sizes, so panic it is.

I'm really just here to update to latest wgpu version to get my recent fix there in a more convenient manner, but doing a PR with just that felt a bit boring ;-). Now I'm of course guilty of conflating things 🤔 

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-02-25 15:59:36 +00:00
Andreas Reich b4859d3ecf panic on empty buffer slice
Fixes #735
2021-02-25 09:59:17 +01:00
bors[bot]andPatrick LaFontaine 3ec521c866 Merge #772
772: spelling error in skybox r=kvark a=Pat-Lafon



Co-authored-by: Patrick LaFontaine <32135464+Pat-Lafon@users.noreply.github.com>
2021-02-25 02:30:55 +00:00
Andreas Reich 1ebd9e2778 Upgrade to latest wgpu 2021-02-25 00:24:49 +01:00
Patrick LaFontaine 3bb7c94b9e spelling error in skybox 2021-02-24 17:29:13 -05: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
bors[bot]andDzmitry Malyshau 75e77d1872 Merge #768
768: Update naga to gfx-12 r=kvark a=kvark

See https://github.com/gfx-rs/wgpu/pull/1226

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-21 17:07:53 +00:00
Dzmitry Malyshau 7fc75c4ec7 Update naga to gfx-12 2021-02-21 12:07:26 -05:00
bors[bot]andDzmitry Malyshau 5879936e23 Merge #766
766: Blend state API update r=kvark a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1224

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-19 21:16:58 +00:00
Dzmitry Malyshau 60fe95205a Blend state API update 2021-02-19 16:16:19 -05:00
bors[bot]andDzmitry Malyshau 243dbf21a4 Merge #765
765: Update naga to gfx-11 r=cwfitzgerald a=kvark

Gets us https://github.com/gfx-rs/wgpu/pull/1220

Note that "cross" feature is not optional here. We could lift it up and add to `default = []` but that would make the Web backend to always unconditionally depend on `wgpu-core` (since enabling a feature on it automatically enables it). So we ideally need a way for Cargo to allow platform-specific default features...

About the shadow example - the experimental translation works on the main pipeline, but fails on the baking pipeline because of https://github.com/gfx-rs/naga/issues/483. Fortunately, it falls back to SPIRV-Cross gracefully here.

The new validation detected a flaw in our shader (comparison sampler mismatch), yay!

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-19 05:03:27 +00:00
Dzmitry Malyshau e733e17e49 Update naga to gfx-11 2021-02-16 10:55:29 -05:00
bors[bot]andDzmitry Malyshau 2aa7705444 Merge #744
744: Demonstrate obj loading in the skybox example r=kvark a=kvark

I wanted to see which example is best suited for `typed-arena` demo... and here I am, implementing a completely different unrelated feature. But I think it's useful, still ;)
Model loading is something everybody needs, and for us depending on `obj` in dev-dependencies cost nothing, especially since I'm basically maintaining it.

<img width="395" alt="screenshot" src="https://user-images.githubusercontent.com/107301/106993149-186c7780-6748-11eb-94ca-7988ef9ee52d.png">


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-13 03:34:39 +00:00
Dzmitry Malyshau 657ee0ba61 Stop using vertex attributes in the mipmap example 2021-02-12 22:33:17 -05:00
Dzmitry Malyshau de8182f152 Demonstrate obj loading in the skybox example 2021-02-12 22:33:17 -05:00
bors[bot]andChris 6864c0be84 Merge #759
759: Correct FragmentState targets comment r=grovesNL a=Systemcluster

Previously the comment was copied verbatim from the `VertexState` `buffers` field. 

Co-authored-by: Chris <me@systemcluster.me>
2021-02-12 03:41:04 +00: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
bors[bot]andZsolt Bölöny f608bafff8 Merge #756
756: Convert `PrimitiveState::cull_mode` to `Option<Face>` r=kvark a=yzsolt

Depends on https://github.com/gfx-rs/wgpu/pull/1206

Co-authored-by: Zsolt Bölöny <bolony.zsolt@gmail.com>
2021-02-11 15:29:30 +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
bors[bot]andDzmitry Malyshau 0234f2723a Merge #754
754: Update naga to gfx-10 r=kvark a=kvark

See https://github.com/gfx-rs/wgpu/pull/1205

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-09 15:22:59 +00:00
Dzmitry Malyshau 35fa7c184e Update naga to gfx-10 2021-02-09 10:21:56 -05:00
bors[bot]andTnze b8ba5c243a Merge #753
753: Use max function to ensure that the swapchain size is not less than 1. r=kvark a=Tnze

ATT

Co-authored-by: Tnze <cjd001113@outlook.com>
2021-02-09 15:12:44 +00:00
Tnze 6e6816e938 Use the "max" function to ensure that the swapchain size is not less than 1. For better readability. 2021-02-09 14:20:22 +08:00
bors[bot]andImbris b029ddeda3 Merge #752
752: Expose missing constants from wgpu-types r=cwfitzgerald a=Imberflur



Co-authored-by: Imbris <imbrisf@gmail.com>
2021-02-07 20:11:22 +00:00
Imbris fadb730a01 Expose missing constants from wgpu-types 2021-02-07 15:08:17 -05:00
cd74c8d9a4 Merge #710
710: Implement read_buffer r=kvark a=fintelia

I'm not sure about the exact interface that makes sense, but this PR sketches out how read_buffer (and eventually also read_texture) could be implemented. 

Resolves #694

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Jonathan Behrens <fintelia@gmail.com>
2021-02-06 20:53:26 +00:00
Jonathan Behrens b17cb30f17 Implement read_buffer utility function 2021-02-06 11:22:37 -05:00
bors[bot]andImbris 1f1a7e5dd4 Merge #745
745: Bump wgpu-core r=kvark a=Imberflur

For the fix of this issue https://github.com/gfx-rs/wgpu/issues/1188

Co-authored-by: Imbris <imbrisf@gmail.com>
2021-02-06 05:16:11 +00:00
Imbris f839755e12 Bump wgpu-core 2021-02-05 22:02:48 -05:00
Dzmitry Malyshau 91fca7c5c3 Experimental ReadBuffer structure 2021-02-05 12:59:49 -05:00
bors[bot]andDzmitry Malyshau f891e86e87 Merge #738
738: Update version and dependencies to gfx-9 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-01 07:17:07 +00:00
Dzmitry Malyshau 7235072f6d Update version and dependencies to gfx-9 2021-02-01 02:16:31 -05:00
bors[bot]andDzmitry Malyshau f882abcf4b Merge #679
679: WGSL shader conversion for the examples r=grovesNL a=kvark

Blocked on:
  - ~~https://github.com/gfx-rs/naga/issues/335~~
  - ~~https://github.com/gfx-rs/naga/issues/336~~
  - ~~https://github.com/gfx-rs/wgpu/issues/1095~~
  - ~~https://github.com/gfx-rs/naga/pull/360~~
  - https://github.com/gfx-rs/gfx/pull/3622
  - ~~GL backend doing the program link check earlier~~

Converted:
- [x] boids
- [x] cube
- [x] mipmap
- [x] msaa-line
- [x] shadow
- [x] skybox
- [ ] texture-array
- [ ] water

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-01-30 06:05:49 +00: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
bors[bot]andDzmitry Malyshau c45fbce8b4 Merge #734
734: Update wgpu to the new render pipeline descriptor API r=grovesNL a=kvark

MAJOR API BREAKING CHANGE
Gets us https://github.com/gfx-rs/wgpu/pull/1176

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-01-30 02:44:01 +00:00
Dzmitry Malyshau 517ce3ef8d Update wgpu to the new render pipeline descriptor API 2021-01-29 00:51:44 -05:00
bors[bot]andDzmitry Malyshau 9fd0630621 Merge #730
730: Fix the web backend in code and CI r=grovesNL a=kvark

Fixes #729

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-01-27 01:58:43 +00:00
Dzmitry Malyshau c1225c42ac Fix the web backend in code and CI 2021-01-26 20:58:13 -05:00