1088: Fix and improve object labels and command markers r=cwfitzgerald a=kvark
**Connections**
Fixes a part of #1089
**Description**
PR contains a bunch of small but important things:
- reset the command buffer label after submission
- add labels to compute and pass descriptors
- actually push/pop markers for the scope of render bundle, compute passes
- set the label to render pass command buffers
- set labels on pipelines
**Testing**
Not tested much
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
* [glsl-in] Cast gl_VertexIndex to SInt
* [glsl-in] Use conversion cast (gl_VertexIndex)
- Also cast gl_InstanceIndex
* [glsl-in] Simplify global var lookup
* [glsl-in] Fix missing comma
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>
1086: Add SHADER_READ usage bit to non-readonly buffers r=kvark a=infinitesnow
Change-Id: I99d189e7ef295a58c2179635f95656eb9a2f5fe6
**Connections**
Fixes#949
**Description**
Non-readonly buffers are created with the STORAGE_WRITE usage flag, but that implies SHADER_READ too.
Co-authored-by: Emanuele Dalla Longa <3xplosive.g@gmail.com>
1077: Remove extern "C" from set_index_buffer r=kvark a=DevOrc
**Connections**
Fixes an issue that is blocking gfx-rs/wgpu-native#61
**Description**
Moves the ffi definition of wgpu_render_bundle_set_index_buffer / wgpu_render_pass_set_index_buffer to wgpu-native. This is needed because wgpu-native has its own version of IndexFormat that is different than the wgpu_types version.
**Testing**
My projects with wgpu-native work
Co-authored-by: Noah Charlton <ncharlton002@gmail.com>
1080: Fix the validation of vertex buffer sizes r=kvark a=JCapucho
**Connections**
None that i know of
**Description**
~~The vertex buffer size (in vertices) was being divided by stride causing the limit to be lower than it was supposed to be.~~
This bug wasn't triggered earlier because if the stride was 0 it wouldn't perform any calculation and the stride was only set when a set pipeline command was received and the `VertexState` `inputs` were already created so the following commands would work:
```
SetPipeline with 1 vertex buffer
SetVertexBuffer with only 4 vertices
Draw 6 vertices
```
This would have passed validation while this wouldn't
```
SetPipeline with 1 vertex buffer of stride 8
SetVertexBuffer with 4 vertices
SetPipeline with 1 vertex buffer of stride 8
SetVertexBuffer with 4 vertices
Draw 3 vertices
```
Now all draw calls have proper vertex validation and not only after the `inputs` are populated
**Testing**
This change was tested after debugging an issue with the draw calls failing in a specific order in [veloren](https://gitlab.com/veloren/veloren/-/tree/imbris/wgpu-master-rebased)
Co-authored-by: Capucho <jcapucho7@gmail.com>
1078: Switch paytests to WGSL r=grovesNL a=kvark
**Connections**
Closes#1073
Updates naga to "gfx-4" tag.
Updates gfx to https://github.com/gfx-rs/gfx/pull/3518
**Description**
This is the first use of WGSL in our codebase! Much nicer to have WGSL for tests than keeping GLSL+SPV pairs.
Interestingly, the tests go through Naga without ever touching SPIR-V now, unless running on Vulkan.
**Testing**
Tests itself - this change applies to testing infra.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>