1219: Validate texture bindings r=cwfitzgerald a=kvark
**Connections**
It was mentioned/requested somewhere, but I can't find the place...
**Description**
Fairly straightforward - just check the view properties against the bind group layout.
**Testing**
Tested on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
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>
naga does not require offset decorations on struct fields in WGSL
source, and automatically adds them to spv output. The `tint` compiler
does not automatically add them, and requires that they be present in
the WGSL source.
A potential confusion is that an spv binary missing required
`OpMemberDecorate` instructions that set the field's offset will fail
validation when run through `spirv-val`. But since naga automatically
produces these offsets, the same spv binary passed through naga will
be successfully validated.
This change is to ignore these decorations in naga's WGSL front end so
that the same WGSL source can be used with naga and tint to produce
valid spv.
1210: Reset the bindings on the push constant change r=wumpf a=kvark
**Connections**
Fixes#1207
(unconfirmed!)
**Description**
I was able to replay the trace in #1207 without validation errors, so I looked deeper into what might have gone wrong.
The code isolated in #1194 looks great. However, the calling code's handling of push constants might have changed a bit.
And I see that the trace uses push constants, so here is what happened, I think:
- layout A was set, expecting bind group layouts X and Z
- bind groups X and Y where bound
- layout B was set, expecting bind group layout X and Y. We see that Y group can now be bound, so we do this. The old logic in this case wasn't considering the push constants in any way, it would only consider them if bind group layouts didn't change, erroneously.
- layout B has different push constant ranges...
So it's a one-line fix now, which I'm hoping is correct.
**Testing**
Not tested
@Wumpf would you be able to check this?
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
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>
1209: Handle player window resizing gracefully r=kvark a=kvark
**Connections**
Deprecates #794 and #793
**Description**
We were often getting this kind of errors when replaying on Linux:
>VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (2094043421)] : Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x56194a357250, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (1980,1080), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (800,600), minImageExtent = (800,600), maxImageExtent = (800,600). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94666619187792)
It's annoying to work around!
**Testing**
Tested on replaying wgpu-rs stuff.
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
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>