`RefCount::rich_drop_inner` is no longer used by anything other than `RefCount::drop`. It's simpler to just handle it directly in `drop`.
`MultiRefCount` has no need to heap-allocate the count, since it's
never cloned.
* 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