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>
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>
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>
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>
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>
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>
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>
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>
`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.
617: Add labels for some error messages r=kvark a=scoopr
This places some pieces on how to transform the ids in the errors to a label, and adds them to the validation message.
This changes the formatting of the validation error to happen when constructing the error, rather than in the unhandled error handler.
It also requires some code for all the error variants for extracting the ids.
Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
This adds transforms for the ids in the errors to a label,
and adds them to the validation error message.
This changes the formatting of the validation error to happen when
constructing the error, rather than in the unhandled error handler.
It also requires some code for all the error variants for extracting the ids.
627: Fixed size in "boids" example r=kvark a=infinitesnow
Buffer size is specified in number of items instead of bytes and fails validation against compiled SPIR-V
Co-authored-by: infinitesnow <3xplosive.g@gmail.com>
624: Remove implicit conversion hello-triangle shader.vert r=kvark a=Napokue
Remove implicit conversion to float, and change it to explicit conversion. Reason for this change is to prepare the hello-triangle example for Naga glsl-spirv path.
Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
618: Removed unusued Uniform struct in texture-arrays example. r=cwfitzgerald a=Stygeon
The Uniform struct in the texture-arrays example is unused.
Co-authored-by: Stygeon <denrellum@gmail.com>
613: Add more context to errors originating in Passes and Encoders r=kvark a=Kimundi
**Description**
This adds some top-level error context information to indicate wether an error originated in a `{Render,Compute}Pass` or `{Command,RenderBundle}Encoder` to make error messages more clear.
Combined with https://github.com/gfx-rs/wgpu/pull/1018, errors in passes will look like this:
```
wgpu error: Validation error
Caused by:
In a RenderPass
In a draw command
index 3600 extends beyond limit 38
```
Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
614: Bump winit version to 0.23.0 r=cwfitzgerald a=daveshah1
This fixes the following error trying to run the hello-triangle (and probably other) examples on GNOME/Wayland:
[wayland-client error] Attempted to dispatch unknown opcode 0 for wl_shm, aborting.
Co-authored-by: David Shah <dave@ds0.me>