As an incidental change, wgpu#2802 (de5fe90f2) changed the definitions
of the bitflags in `wgpu_types::Features` from looking like this:
const DEPTH24UNORM_STENCIL8 = 1 << 1;
to this:
const DEPTH24UNORM_STENCIL8 = Self::DEPTH_CLIP_CONTROL.bits << 1;
The intention was to make it easier to insert new flags at a logical
point in the list, and have the numbers automatically update
themselves.
Unfortunately, `cbindgen` can't cope with the new style of definition.
It produces definitions for these flags that look like this:
#define WGPUFeatures_DEPTH24UNORM_STENCIL8 (uint64_t)((WGPUFeatures_DEPTH_CLIP_CONTROL).bits << 1)
These are integer values, so the `.bits` field access is bogus.
This commit changes the definitions back to using direct numbering,
which `cbindgen` doesn't choke on.
* Add Limit::max_buffer_size.
* Prevent very large buffer with some drivers.
Some drivers run into issues when buffer sizes and ranges are larger than what fits signed 32 bit integer. Adapt the maximum buffer size accordingly.
* Add a downlevel capability for rendering to floating point textures
* Rename capabilities to _capabilities
* Run cargo fmt
* Pass downlevel_flags to the adapter
* Add wgt::DownlevelFlags::COLOR_ATTACHMENT_FLOAT to dx11
* Remove downlevel_flags from the adapter and use is_ext_color_buffer_float_supported instead
* Add DownlevelFlags::WEBGPU_TEXTURE_FORMAT_SUPPORT
* Apply suggestions
Put some plumbing in place to accomodate the latest definition of
`GPURenderBundleEncoderDescriptor` in the WebGPU spec, which now has
separate `depthReadOnly` and `stencilReadOnly` members.
Rename `RenderPassDepthStencilAttachment::is_read_only` to
`depth_stencil_read_only`, and don't skip validation steps due to
early returns.
* Implement submission indexes
* Write some unit tests for poll
* Update wgpu/src/lib.rs
Co-authored-by: Jim Blandy <jimb@red-bean.com>
* Unify Maintain in both wgc and wgpu
Co-authored-by: Jim Blandy <jimb@red-bean.com>
Added:
* WebGPU specification links.
* How to create an instance, if it is not all-public-fields.
* What function or enclosing type this type is used for.
(The latter two are not present for `wgpu-types` items due to the
dependency running the wrong direction for that — I saw existing
`../wgpu/` links, but those do not work on https://docs.rs/wgpu/.)
This commit specifically does not:
* substantially revise existing language, except where necessary to fit
the new information, or when there was an obvious trivial improvement
like adding a link to support "how to use this".
* add similar information to the documentation of types not directly
corresponding to the WebGPU specification
* 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