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>
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.
Signed-off-by: David Shah <dave@ds0.me>
612: Update create_buffer_init_polyfill for wasm32 r=grovesNL a=alankemp
This removes create_buffer_mapped which has been removed in the latest chrome canary and firefox nightly and fixes#609
Co-authored-by: Alan Kemp <alan@alankemp.com>
611: Match inputs/outputs in msaa-line shader r=kvark a=kvark
Note: this shouldn't be necessary, as the varyings are matched by location and not the name. However, spirv-cross doesn't try to fiddle with the varying names, so it fails if they are unmatched.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
577: Fixes#575 - vulkan-portability feature on MacOS r=kvark a=rybertm
See #575.
This PR fixes the issue with enabling `vulkan-portability` on MacOS.
Co-authored-by: Robert Broketa <robertbroketa@gmail.com>
574: Implement AsRef for BufferView r=kvark a=de-vri-es
This PR implements `AsRef` and `AsMut` in addition to `Deref` and `DerefMut` for `BufferView` and `BufferViewMut`.
This allows the buffer views to be used directly by generic code that wants an `AsRef<[u8]>`.
It's also subjectively a small win when you want to pass the views to non-generic code. I find `buffer.as_ref()` clearer than `&*buffer`. That also goes for `buffer.deref()`, but `Deref` is not in the prelude.
Co-authored-by: Maarten de Vries <maarten@de-vri.es>
576: Convert swapchain.get_current_frame to a immutable reference r=kvark a=cwfitzgerald
Per our discussion on matrix, converts swapchain.get_current_frame to an immutable reference as it's internally synchronized.
Rationale: will allow me to take a non-pretty RW mutex as read instead of write in my application
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
570: web: temporarily polyfill `create_buffer_init` r=kvark a=grovesNL
Temporarily polyfill `create_buffer_init` on the web backend by using the old buffer mapping API. This is just a temporary fix until the new buffer mapping API is available in Nightly.
This polyfill allows us to run `cube` from `master` on Nightly (there's still lots missing from other examples). But at least some simple use cases (e.g. projects only using `create_buffer_init`/`write_buffer` and no other buffer mapping functions) can run with `master`.
Co-authored-by: Joshua Groves <josh@joshgroves.com>