* Support to create surface from visual on Windows, add mpo(Multiple Plane Overlay) feature to AdapterInfo
* Expose create_surface_from_visual method
* Fix code style
* Make code more concise
* Revert mpo from AdapterInfo
The `min_index` parameter has no useful effect. Because the range 0..n is pushed
on the free list, index values less than `min_index` do get allocated.
Document `IdentityManager` and `TypedId`.
* CLEAR_COMMANDS extension is now more of a window into wgpu zero-init
this has mostly implications on the constraints, but also allows a more leaky documentation which makes sense for this non-standard function as there is no other place to look it up
* clear_texture via renderpasses wip
* 3D depth textures are no longer allowed, volumes are always cleared via CPY_DST
* cleanup texture's clear_views
* rename CLEAR_COMMANDS to CLEAR_TEXTURE
* separate clear_texture into reusable & more descriptive parts
* texture clear views are now created ahead of time
* discarded surface fixup goes through new clear_texture method now
* onq ueue texture initialization now goes threw clear_texture
pending inits need to store Stored textures now though, causing more ref count bumping
* texture init on queue_write_texture now also goes through new clear_texture
* transfer functions on commandbuffer use now new texture init route
* merge collect_zero_buffer_copies_for_clear_texture into clear_texture_via_buffer_copies
* clear functions now take TextureInitRange
* Fix clippy lints
* command_encoder_clear_texture no longer takes write lock on texture
* TextureClearMode encodes now is_color
* code cleanup, mostly about `use`
* Handle volume textures in clear_texture_via_render_passes properly
* texture clear no longer requires id::Stored
* init tracking fixes for volumes and init on partial subresource writes
* texture creation enforces COPY_DST only if absolutely necessary
* unrolled functional chain, reduce unsafe scope size
* fix clippy lints
* clear_texture test no longer creates 1D textures
see #2323
* 3D textures are no longer cleared as render target since this isn't supported on Metal
* fix deno building issue, fix formatting
* TextureInner::Surface can now be zero initialized
* Add feature gated 16-bit normalized texture support
Fixes#1934
* Query format properties only once
* Prevent supports_format from erroneously reporting false if the format wasn't queried
* Assert that 16bit norm formats also support on vulkan
* Add storage to TextureFormatInfo for 16-bit norm formats now that we check for support
* Introduce SamplerBindingType enum and fix bug in validation
This matches the WebGPU spec more closely and also lets us implement the
validation as it's written in the spec[1]. This fixes a bug which
previously prevented the "shadow" example from running in Firefox.
Previously the validation would check whether the filtering was
appropiate even if it was a comparison sampler. This didn't matter when
running the shadow example natively since the example was setting
`filtering: true` in addition to `comparison: true`. But this failed
when running through a browser since there the used WebIDL has the
proper enum representation and eventually resulted in `filtering: false`
being passed to wgpu-core which would then fail validation.[2]
[1]: https://gpuweb.github.io/gpuweb/#bind-group-creation
[2]: 674b6582ba/dom/webgpu/ipc/WebGPUChild.cpp (L502-L513)
* Fix remaining examples
* Fix deno_webgpu
* Renamed clear_buffer to fill_buffer (keeping up with spec)
* fill_buffer does not require CLEAR_BUFFER feature
* Changed ClearBuffer to FillBuffer for `trace` feature
* Renamed clearBuffer for web backend
* Creation of max compute workgroup size limits
* Implemented for Vulkan and Dx12
* Follow up of gfx-rs/wgpu#1808
* Check if current dispatch operation is under the limit
* Typos and some forgotten fixes
* Port to GLES
* Port to Metal with default limits
* Change Vulkan max_workroup_size_per_dims to pick the min of the reported dimensions
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
* Added tests for texture zero init
sadly, they are typically passing even if texture zero init isn't doing its job
However, they form nice isolated examples for testing out texture initialization
It could be possible to dirty texture memory prior to ensure zero init did the job
* texture init tracker
* tracking texture init requirements for bind group, transfer and rendertarget
* texture clears for texture init
* queue submit
* write_texture
* Enforce presence of either render target or copy_dst flag
* clear render targets also with using buffer copies
enforce COPY_DST usage now on all textures
* adjust ImageSubresourceRange.layer_range calculation for 3D textures
init_tracker has now a `discard` function to get single data points back to uninitialized
use new standardized partition_point function
* track init state for discarded textures from renderpasses
missing:
* init on the fly if discarded is found within command buffer
* handle discarding only stencil or only depth
* added tests for zero init after discard
* tracking discarded surfaces now in separate struct, piping all inits through utility function
allows to resolve discard/init_action interactions
* Move various memory init code to separate mod
CommandBufferTextureMemoryActions is now fully encapsulated
* implemented discard init fixups for everything but renderpass
* render passes also cause now discard fixups
* fixup_discarded_surfaces takes now an iterator instead of Drain
* Add memory init test for discarding depth targets
* handle divergently discarded depth/stencil target
* comment & clippy fixes
* fix collect_zero_buffer_copies_for_clear_texture yielding block breaking copies
* [pr feedback] minor cleanup in zero_init_texture_after_discard, `use` hygenie
* [pr feedback] fix bug in ImageSubresourceRange range utils
* [pr feedback] fix texture tracker check, bundle transition_texture on init, cleanups
* Implemented drop for InitTrackerDrain
* remove incorrect comment about extents in add_pass_texture_init_actions
* Fix unit test & clippy issues in init_tracker
* init_tracker has now a `discard` function to get single data points back to uninitialized
use new standardized partition_point function
* allow unused InitTracker.discard function for time being
* new test for clearing textures of all formats
* clear_texture is now always implemented in wgpu-core instead of wgpu-hal
* add 1D/array/volume texture to clear_texture test
* set mip_level_count to 1 for D1 textures in clear_texture test
* fix warning & clippy lints
* Fix web build
* [pr feedback] fix potentially skipped resource transition, fix wrong mip size for texture clear
* collect_zero_buffer_copies_for_clear_texture aligns rows now properly
* Move validation from `Device::create_texture_from_hal()` to `Device::create_texture()`
---
Users encountered a segfault upon creating a texture when mip_level_count was set to 0 with (at least) Vulkan.
This is due to wgpu's validation taking place after the API's texture is created.
This change moves wgpu's validation to before the API's texture is created, introducing a friendly error instead of a segfault.
* Make `Device::create_texture_from_hal()` infallible
* run cargo fmt
* enable CLEAR_COMMANDS feature for all adapters
* replaced fill_buffer with clear_buffer (minus variable value)
* Improve clear buffer/texture test
and remove unused clear-buffer.ron test
* renamed clear_image to clear_texture
* skeleton for new wgpu-hal clear_texture
* clear_texture implementation for vulkan
* clear_texture now restricts usage
* clear_texture implementation for dx12
* Implemented clear_texture for Metal backend
* Clean up GLES clear_buffer and leave note on how to implement clear_texture in the future
* fix linux compilation & formatting issues
* comment & namespace fixes
* Extent3d has now a simple mipmap calculating function
Fix incorrect use of texture.size in clear_texture for metal/dx12
Fix incorrect mip/layer ranges in clear_texture for metal/dx12
* WIP: add cts_runner and deno_webgpu crate
* add test
* remove Cargo.lock
* review comment
* simplify
* fix bugs
* improve cts_runner to work with crowlKats/webgpu-examples
* fix
* remove build.rs
cts_runner binaries are now not portable anymore.
Also startup will now print a bunch of cargo:rerun-if-changed=. This
will be fixed in deno_core.
* remove d.ts
* add original deno license file
* hal/metal: support Features::NON_FILL_POLYGON_MODE
* Document Metal support for NON_FILL_POLYGON_MODE
* Split Features::NON_FILL_POLYGON_MODE in two
Adds two new features: `LINE_POLYGON_MODE` and `POINT_POLYGON_MODE`.
Allows metal to support `PolygonMode::Line` while not being required to
support `PolygonMode::Point`.
* Formatting
* Rename {LINE,POINT}_POLYGON_MODE to POLYGON_MODE_{LINE,POINT}
* split out init_tracker module
with explicit buffer init tracking types
* Added shortcut methods for checked init action handling
Fixed a few unchecked sites in the process
* fix clippy warnings
due to previous changes there was only a no-op buffer collapse
The ranges it tried collapsing on were already guranteed to be merged by the init-trackers drain method. However, accross several init actions there can be opportunity for reducing fill_buffer calls.
1609: [Vulkan] Initialize wgpu objects from raw handles r=kvark a=zarik5
**Connections**
This PR is a successor of https://github.com/gfx-rs/gfx/pull/3762
**Description**
The `handle_is_external` flag mechanism was not enough to ensure safety, when for example the Instance is wrapped in `Arc<>` and a library cannot keep track of all its clones. This is the case with the bevy render rewrite. The solution was to let wgpu be in charge of destroying the handles, but it also has to keep a reference to a "drop guard" which is always dropped after the handle is destroyed. For the OpenXR integration, this drop guard will be `xr::Instance`.
For now this is just a proof of concept. Only instance creation is handled, and there is even type error in `wgc::Instance::from_hal()`.
I have a few concerns:
* Is it ok to expose `hal::Instance` from the wgpu crate? Or should the user pass all the parameters so `hal::Instance` can be constructed internally? This second options is more disruptive, since the wgpu-types crate would need to import all platform-specific crates to define the structure/enum to hold the raw handles.
* Without counting the call to create the `hal::Instance`, there are 4 indirection calls to save the raw instance. Can this be optimized in any way?
Do you think it is possible to merge wgpu-hal into wgpu-core? This could help with reducing the distance from the surface level API to the platform specific APIs even more.
**Testing**
Vulkan/Android (Oculus Quest) using [this sample](https://github.com/zarik5/openxrs/blob/wgpu-test/openxr/examples/vulkan.rs).
Co-authored-by: Riccardo Zaglia <riccardo.zaglia5@gmail.com>
1704: Fix buffer memory initialization to use the tracker consistently r=kvark a=kvark
**Connections**
Depends on https://github.com/gfx-rs/naga/pull/1125
**Description**
Contains a number of dx12 fixes in addition to the buffer initialization fix.
The problem there was - we used the "pending writes" command buffer to initialize buffers, but also used the device's resource tracker and its state to figure out the transitions *after* a command buffer is merged its states.
**Testing**
Ran the examples on Vulkan.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1602: New DX12 backend (unfinished) r=kvark a=kvark
**Connections**
Continuation of #1471
**Description**
Mostly fresh implementation on DX12 backend for wgpu-hal
Core changes:
- texture usage is filtered before passing to `create_texture_view`, so that wgpu-hal can assume every bit is important.
- all the copies involving textures are limited to one array layer at a time
- remove render pass boundary usages
**Testing**
Examples (not running yet)
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1607: Fix Downlevel Vertex Stage Storage Buffer Check r=kvark a=cwfitzgerald
**Connections**
Fixes a bug in #1599. Also follows up on #1583 marking all of hello-compute as a failure.
**Testing**
Tests now pass on rpi4.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
1599: Fix Limits for lava/llvmpipe and re-enable and re-work CI r=kvark,groves,wumpf a=cwfitzgerald
**Connections**
No longer fixes#1551.
**Description**
This PR has a couple things going on at once.
- Fixes limits for llvmpipe, lavapipe, and rpi4.
- Added a downlevel limit to express that RPI4 does not allow storage buffers in vertex shaders on GL.
- Added a `Limits::downlevel_default()` that takes minimum limits from GLES and adds some more documentation on how to choose limits.
- Moved all examples to the new downlevel limits
- Reworks CI to re-enable software testing and unify instructions.
**Testing**
It is
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
1592: Detailed limits check and error r=cwfitzgerald a=kvark
**Connections**
Related to #1590
**Description**
The old comparison "A < B" was simply wrong, because it would do every field in order and could bail out mid-way without reaching for all limits.
**Testing**
Untested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
DYNAMIC_INDEXING is checked by default, since WGPU doesn't allow
for any kind of specialization constants and constant indexing is
nigh useless.
STORAGE_RESOURCE_BINDING_ARRAY is enabled iff the device supports:
- both or neither of uniform and buffer arrays with dynamic indexing;
- both or neither of sampled and storage images with dynamic indexing.
NONUNIFORM_INDEXING is enabled iff for ALL types of descriptor arrays
*that are supported for dynamic indexing*, nonuniform indexing is
also allowed.
These flags have a limitation in that some platforms
(eg.
https://vulkan.gpuinfo.org/displayreport.php?id=11692#features_core_12)
may support a strange subset of those features (example device
supporting non-uniform indexing for textures and storage buffers,
but NOT for storage textures or uniform buffers). In that case feature
will be reported as missing, even though it is partially present.
In the author's opinion, this flag set is convenient for the
users to query; however, due to aforementioned limitations, it would be
desirable to obtain statistics about "edge-case" platforms and what
percentage of reports they comprise.
1562: Fix check for QUERY_SET_MAX_QUERIES was using >= instead of > r=cwfitzgerald a=HalfVoxel
Fixes#1560
Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
1559: Query support fixes r=kvark a=Wumpf
**Connections**
Fixes#1374 for master
If PR is accepted,I already have a fix for 0.9 which came out as a sideproduct: https://github.com/Wumpf/wgpu/tree/v0.9-fix-buffer-init-on-query-resolve
**Description**
Fixes:
* (affects master, v0.8, v0.9) query resolve operation not marking buffers as initialized
* (affects master) Broken query stride handling for Vulkan
* (affects master) Vulkan not advertising query support
**Testing**
* added new test
* mipmap sample
Co-authored-by: Andreas Reich <r_andreas2@web.de>
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>
- Remove Cow from wgpu-hal API surface. You graze on in our hearts.
- Rename feature flag to SPIRV_SHADER_PASSTHROUGH in anticipation
of crate feature `spirv` to reduce confusion.
- Add some more documentation about behaviour and intended avenues of
use to the feature.
1528: Support TEXTURE_SPECIFIC_FORMAT_CAPABILITIES for rendertargets. r=kvark a=ElectronicRU
**Description**
With TEXTURE_SPECIFIC_FORMAT_FEATURES enabled, one would assume that render pipeline creation would use extended features
for color/depth-stencil render targets. However, it does not. This aims to fix that discrepancy.
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
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.
1511: Added storage texture array support. r=kvark a=ElectronicRU
**Description**
Arrays of storage images (*f*image*n*D in GLSL parlance) should now be supported.
I also took the liberty to refactor texture format checking a bit,
and tighten up sampled texture support detection for Metal as well.
**Testing**
Not completely sure what's the proper testing approach here, open to suggestions.
Co-authored-by: Alex S <alex0player@gmail.com>
1513: Fix failing test compilation on windows - DX12 and DX11 not there. r=kvark a=ElectronicRU
**Description**
Due to some things in macros being left on cfg(windows) and some changed to cfg(dx12/dx11), the tests didn't even compile, much less run.
**Testing**
Ideally, some CI for Windows should be set up.
Co-authored-by: Alex S <alex0player@gmail.com>
1474: Add clear buffer/image to wgpu-rs api r=kvark a=Wumpf
Follow up to #1335
Started using this in Blub fluid sim a little bit on volume textures, works nicely 432fb75a68, more to come
Co-authored-by: Andreas Reich <r_andreas2@web.de>
1417: Split the tracker into stateful/stateless to reduce the overhead r=cwfitzgerald a=kvark
**Connections**
Implements https://github.com/gfx-rs/wgpu/issues/1413#issuecomment-851604344
Reduces the overhead for resource tracking in the Animometer benchmark by up to 50%.
**Description**
We used to use the full tracker set on the usage scopes associated with compute/render passes. A resource tracker has 2 responsibilities: ensuring the resource is held alive, and validating and recording the state transitions. This PR exploits the fact that the latter responsibility is only applicable for buffers and textures. So doing all the lifetime tracking for a pass is a waste: we can instead just attach the lifetimes to the parent command buffer, straight.
In the Animometer benchmark, there is one large buffer, and thousands of bind groups pointing to different offsets into it. The old code would fill up the pass tracker with those bind groups, and then merge it into the command buffer tracker. The new code would just fill up the command buffer tracker instead. Since there is only one buffer, the pass tracking becomes much lighter.
**Testing**
Untested. It would be nice to have some benchmarks here, possibly after #1397 ?
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1403: Trace render passes before they are ran r=cwfitzgerald a=kvark
**Connections**
Follow-up to #1245
**Description**
We want the API traces to reproduce issues. Previously, we moved all the resource creation to happen after the trace is written.
This PR follow-up by also recording the render pass commands even in the case where one of them triggers a validation error.
Another big part of the PR now is handling the command buffers that failed for some reason. The submission is skipping them now instead of erroring the whole thing.
**Testing**
Tested manually on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
* 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
1391: Simplify features r=cwfitzgerald a=kvark
**Connections**
Fixes#1390
Makes vertex writable storage optional (native-only for now)
Fixes the follow-up to #891
**Description**
Refactors the code so that adding new features and maintaining current ones is much easier.
Refactors the way missing features are checked and reported, DRY way.
**Testing**
Not really tested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1381: Update naga to gfx-25 r=kvark a=kvark
**Connections**
Fixes#1362
Picks up https://github.com/gfx-rs/gfx/pull/3752 and https://github.com/gfx-rs/gfx/pull/3758
**Description**
Updates gfx and Naga. Hooks up the new validation capabilities.
**Testing**
Self-testing.
Note: this PR doesn't currently work because Metal's backend is now required use a sizes buffer when dynamically sized arrays are present. One of the internal tests here uses them.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1325: Relax and imporve vertex attribute validation r=cwfitzgerald a=kvark
**Connections**
None
**Description**
Improves our validation of vertex attributes in the following ways:
1. Relaxes the size matching, so that we allow the shaders to default some of the values we don't provide
2. Require interpolation to match
3. Make the error messages more detailed:
> In Device::create_render_pipeline
error in stage VERTEX
error matching the stage input at 1 (Uint32x2 interpolated as None) against the previous stage outputs
input type is not compatible with the provided Float32x2
**Testing**
Tested on wgpu-rs examples.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
- Rename `ColorAttachmentDescriptor` to `RenderPassColorAttachment`
- Rename `DepthStencilAttachmentDescriptor` to `RenderPassDepthStencilAttachment`
- Rename `attachment` fields on both attachments to `view`
1279: Fix some typos r=kvark a=grovesNL
**Description**
Fix a few small typos in doc comments
**Testing**
None
Co-authored-by: Joshua Groves <josh@joshgroves.com>
* 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
* Add CONSERVATIVE_RASTERIZATION native feature
* update gfx to cd3042d8c02d9dc7fc74ac8c292099c9789f6d43
* error for polygon mode not fill +conservative raster
* wgpu-core: update gfx-hal usage related to sparse resources
* wgpu-core: support naga gfx-13
* Update gfx and naga dependencies to gfx-13 tag
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1247: Add license to the memory init tracker r=kvark a=kvark
**Connections**
Gecko's code lints complain...
**Description**
Add a license header like all the other files
**Testing**
should work!
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
1243: Force-drop the token before calling fire_map_callbacks r=kvark a=kvark
**Connections**
Related to WebGPU update in Gecko
**Description**
Since the token was alive, technically, we saw an assertion firing up about concurrent access to the token root.
**Testing**
Tested in Gecko
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
1237: Move `#[error]` attributes after the corresponding `#[derive]` r=kvark a=Aaron1011
**Connections**
See https://github.com/rust-lang/rust/issues/79202
**Description**
Fixes Nightly future-incompat warnings
**Testing**
There are no behavior changes intended.
Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
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>
1190: Fix crash on zero init of buffer with no more ref count r=kvark a=Wumpf
**Description**
Previously, if a buffer would no longer have any reference, the zero init step crashed when trying to unwrap its ref_count.
**Testing**
Tested successfully on 54a0f4ff13 where this problem would pop up
Co-authored-by: Andreas Reich <r_andreas2@web.de>
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>
1144: Fix and simplify attachment dimension mismatch check r=kvark a=DasEtwas
This also improves error messages with detailed dimension and attachment type name info which developers can hopefully recognize.
**Connections**
None
**Description**
Before this commit, depth/stencil attachments are not considered when evaluating the renderpasses' dimension, which will result in a "NoAttachment" error with a confusing display message.
**Testing**
Tested by running an application making use of color-only and depth/stencil-only attachment renderpasses.
Tested by running boids, hello-triangle and shadow examples.
Co-authored-by: DasEtwas <18222134+DasEtwas@users.noreply.github.com>