Commit Graph
689 Commits
Author SHA1 Message Date
Zsolt Bölöny b7ea3f3b4a Update to latest wgpu master 2020-12-14 17:57:27 +01:00
bors[bot]andConnor Fitzgerald 2ef725065e Merge #672
672: Add write_whole_texture_mips Helper r=kvark a=cwfitzgerald

Adds a helper in QueueExt for uploading an entire texture with all of its mips. Name very bikeshedable.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-12-13 05:45:03 +00:00
Connor Fitzgerald a4202a4ff0 Add create_texture_with_data helper 2020-12-12 01:50:49 -05:00
bors[bot]andMikko Lehtonen 056612a094 Merge #671
671: Add label to create_shader_module r=cwfitzgerald a=scoopr



Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
2020-12-09 00:23:25 +00:00
Mikko Lehtonen 28931e34cc Add label to create_shader_module 2020-12-08 22:56:17 +02:00
bors[bot]andDzmitry Malyshau d317dc6e3e Merge #669
669: Update wgpu with Naga changes, replace hello-triangle shaders with WGSL r=cwfitzgerald a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-07 15:15:16 +00:00
Dzmitry Malyshau f213d1db8f Update wgpu with Naga changes, replace hello-triangle shaders with WGSL 2020-12-07 09:45:24 -05:00
bors[bot]andConnor Fitzgerald 3ac365b9e4 Merge #664
664: Integrate ETC and ASTC textures in Skybox example r=kvark a=cwfitzgerald

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

Converts skybox example to mip-mapped files in:
 - Bgra8
 - Bc1
 - ETC2
 - ASTC4x4

Looks quite good now with mipmapping and trilinear filtering even at small resolutions.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-12-06 22:27:35 +00:00
Connor Fitzgerald 7dbe4274fb Integrate ETC and ASTC textures in skybox example 2020-12-06 16:51:57 -05:00
bors[bot]andDzmitry Malyshau 37eaeb2054 Merge #663
663: Shader module descriptor r=cwfitzgerald,grovesNL a=kvark

Depends on https://github.com/gfx-rs/wgpu/pull/1071
Fixes #665
Based on #662

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-06 02:13:54 +00:00
Dzmitry Malyshau 7b06c4a3f7 Introduce ShaderModuleDescriptor 2020-12-05 18:53:37 -05:00
bors[bot]andkejor f276e2cb08 Merge #662
662: API and examples update for index_format r=kvark a=kejor

__Connections__
#608 https://github.com/gfx-rs/wgpu/issues/978 https://github.com/gfx-rs/wgpu/pull/1019

__Description__
Use new API from https://github.com/gfx-rs/wgpu/commit/4513fb2b83fe2cd19682ccca9c55a6995f061699 where `wgpu_render_pass_set_index_buffer` and `wgpu_render_bundle_set_index_buffer` receive an `index_format` and `VertexStateDescriptor`'s `index_format` is an `Option`. The examples were updated accordingly.

Co-authored-by: kejor <kevinoviedorueda@gmail.com>
2020-12-05 02:14:38 +00:00
kejor 423c2489b8 API and examples update for index_format 2020-12-04 20:29:42 -05:00
Dzmitry Malyshau 41a1475b18 Fix map_extent_3d in the Web backend 2020-12-02 17:32:36 -05:00
bors[bot]andJoshua Groves d7812268e0 Merge #659
659: Temporarily skip debug labels for web backend r=kvark a=grovesNL

Debug labels aren't currently supported by gecko. We can re-enable these later.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-12-02 04:12:45 +00:00
Joshua Groves 7e1297efc0 Temporarily skip debug labels for web backend
Debug labels aren't currently supported by gecko
2020-12-02 00:32:55 -03:30
Joshua Groves 3d10ce3ea7 Specify version for wasm-bindgen-cli 2020-12-01 21:41:46 -03:30
bors[bot]andJoshua Groves f491fd6781 Merge #657
657: Add EGL to docs action r=kvark a=grovesNL

Looks like we need to install EGL for the docs action to match the regular CI action, see https://github.com/gfx-rs/wgpu-rs/runs/1478040907

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-12-02 00:54:29 +00:00
Joshua Groves 62425205de Add EGL to docs action 2020-12-01 21:18:16 -03:30
Joshua Groves 98828e8faf Publish examples to subdirectory 2020-12-01 21:09:53 -03:30
Dzmitry Malyshau 2f839699b5 Create CHANGELOG.md 2020-12-01 09:25:15 -05:00
bors[bot]andDzmitry Malyshau 6af3f0f07b Merge #655
655: Update to gfx from master r=kvark a=kvark

Depends on https://github.com/gfx-rs/wgpu/pull/1057
Expect the unexpected wrt the gpu-descriptor, which hasn't been tested much!

Also refactors the CI a bit to reduce the number of jobs by moving out `wasm` into a separate job.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-01 04:47:39 +00:00
Dzmitry Malyshau 78234dd120 Update to gfx from master 2020-11-30 23:45:56 -05:00
bors[bot]andDzmitry Malyshau 10726ef4ff Merge #649
649: Adopt the updated bind group entry API r=kvark a=kvark

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

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-12-01 03:45:56 +00:00
Dzmitry Malyshau 9c529b94f5 Adopt the updated bind group entry API 2020-11-30 22:31:31 -05:00
bors[bot]andJoshua Groves ec695078de Merge #654
654: Use web-sys release instead of patch r=kvark a=grovesNL

`patch` isn't necessary anymore because there's a new release of web-sys and wasm-bindgen

Fixes #637

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-12-01 02:49:48 +00:00
Joshua Groves dd84d16ddc Use web-sys release instead of patch 2020-11-30 22:26:40 -03:30
bors[bot]andDiggory Blake 5e032c95d0 Merge #653
653: Print chosen adapter when running examples r=kvark a=Diggsey



Co-authored-by: Diggory Blake <diggsey@googlemail.com>
2020-11-30 18:41:44 +00:00
Diggory Blake bed49ac654 Print chosen adapter when running examples 2020-11-30 18:33:51 +00:00
bors[bot]andlordnoriyuki 38e7c4e232 Merge #651
651: Removing gfx-backend-gl on macOS r=grovesNL a=lordnoriyuki

Updating to latest wgpu.
Removing references to gfx-backend-gl on macOS.

Fixes https://github.com/gfx-rs/wgpu-rs/issues/646

Co-authored-by: lordnoriyuki <lordnoriyuki@gmail.com>
2020-11-30 03:11:11 +00:00
lordnoriyuki 8b2cf9949e Updating wgpu-rs dependency for backend-gl removal on macOS, including reference in direct.rs 2020-11-29 18:50:27 -08:00
bors[bot]andDevin Hill e59ea495a6 Merge #639
639: Make BindingResource::TextureViewArray more flexible (addresses #588) r=grovesNL a=98devin

Fixes #588 

Rather than having a field of `&[TextureView]`, which requires either keeping all TextureViews in a vector in the first place or moving them into a temporary vector or array and back, use `&[&TextureView]` instead. Obviates the need for hacky workarounds if you keep your TextureViews in non-contiguous structs, maps, or can't move them, etc.

For those using a vector previously, the required transformation is merely `.iter().collect()`.

Co-authored-by: Devin Hill <98devin@gmail.com>
2020-11-25 04:07:29 +00:00
bors[bot]andlordnoriyuki d0777a70e7 Merge #640
640: Updating to latest wgpu for gpu-alloc fixes r=grovesNL a=lordnoriyuki

Fixes https://github.com/gfx-rs/wgpu/issues/1043

Co-authored-by: lordnoriyuki <lordnoriyuki@gmail.com>
2020-11-25 03:49:49 +00:00
lordnoriyuki d788d2f2c3 Updating to latest wgpu for gpu-alloc fixes 2020-11-24 19:45:32 -08:00
Devin Hill 337612a49f make TextureViewArray take a slice of refs; fix texture-arrays example to match. 2020-11-24 21:09:00 -05:00
bors[bot]andGreg V fd1378b826 Merge #635
635: Staging belt: do not panic by unwrapping send result in recall (fixes #634) r=kvark a=myfreeweb



Co-authored-by: Greg V <greg@unrelenting.technology>
2020-11-24 16:49:16 +00:00
Greg V fe5b4c3317 Staging belt: do not panic by unwrapping send result in recall (fixes #634) 2020-11-24 19:46:32 +03:00
Dzmitry Malyshau c29c0ab970 Update wgpu with gpu-alloc fixes 2020-11-24 09:56:09 -05:00
bors[bot]andJoshua Groves 14be7df756 Merge #615
615: Update web bindings r=kvark a=grovesNL

- Use newer buffer mapping API everywhere and remove polyfill.
  - There's a weird thing here where we hand out `&[u8]`/`&mut [u8]`s for users to write into, but later have to copy back into the browser-provided `ArrayBuffer`. It's done during `Drop` here but open to some other ideas.
- Add in `web_sys::GpuTextureComponentType::DepthComparison` though it looks like we don't have it in Gecko yet:
  > GPUDevice.createBindGroupLayout: 'depth-comparison' (value of 'textureComponentType' member of GPUBindGroupLayoutEntry) is not a valid value for enumeration GPUTextureComponentType.
- `mipmap` fails because `layout` is still required in Gecko:
  > GPUDevice.createRenderPipeline: Missing required 'layout' member of GPUPipelineDescriptorBase.
- Add in some parts that we can implement now, including labels, debug markers, render bundles, and `get_bind_group_layout`

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-11-24 04:25:00 +00:00
Joshua Groves bd23f803d7 Add get_bind_group_layout to web backend 2020-11-24 00:11:26 -03:30
Joshua Groves 069828d831 Add more labels and debug markers to web backend 2020-11-24 00:11:26 -03:30
Joshua Groves 38d0d37dbf Add render bundles to web backend 2020-11-24 00:11:26 -03:30
Joshua Groves d7b745e5af Update web bindings 2020-11-24 00:11:16 -03:30
bors[bot]andDzmitry Malyshau 711376949a Merge #633
633: Port to the updated wgpu error model r=scoopr a=kvark

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

I removed most of the helping sugar we had before, in exchange for simple `match` and a `handle_error` function.
I believe this way it's easier to maintain and debug (stepping through closures is a pain today).

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-11-23 23:04:54 +00:00
Dzmitry Malyshau 2dc59ba2d9 Port to the updated wgpu error model 2020-11-23 17:59:21 -05:00
bors[bot]andMikko Lehtonen 4fb4eac485 Merge #632
632: Improve error messages r=kvark a=scoopr

Improve error messages
depends on gfx-rs/wgpu#1037


Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
2020-11-23 15:50:23 +00:00
Mikko Lehtonen caa3320315 Handle PassErrorScope Ids 2020-11-23 08:23:43 +02:00
Mikko Lehtonen bcf8ef007f Add label for render pass context error
Also made the label key settable
2020-11-21 23:47:07 +02:00
bors[bot]andJoshua Groves dff97b0eb5 Merge #631
631: Temporarily use `BackendBit::PRIMARY` in examples r=kvark a=grovesNL

`BackendBit::all()` allows GL/surfman to be used on macOS which appears to prevent rendering with Metal (e.g. hello-triangle displays an empty window).

surfman will be removed in later versions of gfx, which will allow us to switch back to `BackendBit::all()` in the examples.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-11-21 03:54:15 +00:00
Joshua Groves 4fafceb30a Fix typo 2020-11-21 00:07:57 -03:30