1525: Add Naga bypass to allow feeding raw SPIR-V shader data to the backend. r=kvark a=ElectronicRU
**Connections**
Fixes#1520 .
**Description**
While Naga checking is undoubtedly very useful, it currently lags behind
what is possible in SPIR-V and even what is promised by WGPU (ie binding
arrays). This adds an unsafe method to wgpu::Device to allow feeding
raw SPIR-V data into the backend, and adds a feature flag to request a
backend supporting this operation.
**Testing**
`texture_arrays` example is runnable now, which uncovers an additional bug in Vulkan backend - binding arrays are instead treated like sole bindings, and indices shift, too. Lots of errors from validation layer ensue.
Co-authored-by: Alex S <alex0player@gmail.com>
- rename ShaderInput variants
- rename feature flag
- hard error on Metal backend trying to compile SPIR-V
- fix test failing because of feature flag bits changing
* Add command buffer fill buffer method
* Added test for buffer fill
* Added image clear + test
* image/buffer clear methods are now pure clear to zero
* fix cargo clippy & int type issues
* clear buffer alignment is now given by COPY_BUFFER_ALIGNMENT
* joined buffer/image clear player tests
* ImageSubresourceRange is now used in TextureViewDescriptor
- Rename `ColorAttachmentDescriptor` to `RenderPassColorAttachment`
- Rename `DepthStencilAttachmentDescriptor` to `RenderPassDepthStencilAttachment`
- Rename `attachment` fields on both attachments to `view`
* chore: validate offset + size in get_mapped_range
This commit introduces out of bounds & offset validation for
buffer_get_mapped_range, like described in the WebGPU spec. See
https://gpuweb.github.io/gpuweb/#dom-gpubuffer-getmappedrange.
Closes#818
* review comments
* fmt
* fix test
* fix tests
* update error message
* review comment
* use wgt::BufferAddress
* clippy
1182: Update all versions r=kvark a=kvark
**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3620 and a bunch of other fixes in gfx-rs and naga.
**Description**
Updates the dependencies ("gfx-9" naga train) as well as self version to 0.7, to match the v0.7 branch.
**Testing**
Should just work :)
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1151: Update gfx and naga to gfx-6 tag r=cwfitzgerald a=kvark
**Connections**
Fixes#1149
Regression from https://github.com/gfx-rs/gfx/pull/3573
**Description**
The physical devices held references to `RawInstance` in Vulkan backend, and we weren't cleaning them up.
Note: an alternative fix could be in `gfx-backend-vulkan` - to move the `Entry` into `RawInstance`, thus delaying the shutdown. I didn't go this way because that would be less explicit.
**Testing**
Tested on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
1093: Update naga and gfx, move the shader validation into a shader descriptor bit r=cwfitzgerald a=kvark
**Connections**
Includes https://github.com/gfx-rs/gfx/pull/3533 and a bunch of Naga things.
**Description**
Updates Naga with the new WGSL syntax, lots of fixes.
Large update of the GL backend.
**Testing**
Tested on some wgpu-rs examples.
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>