- Fix build failure in rust 1.64 #2967
- fix dynamic stencil reference for Replace ops
- fix SPIR-V generation from WGSL, which was broken due to "Kernel" capability
- validate buffer storage classes
- Naga is used by default to translate shaders, SPIRV-Cross is optional behind
cross
feature - Features:
- buffers are zero-initialized
- downlevel limits for DX11/OpenGL support
- conservative rasterization (native-only)
- buffer resource indexing (native-only)
- API adjustments to the spec:
- Renamed
RenderPassDepthStencilAttachmentDescriptor
toRenderPassDepthStencilAttachment
:- Renamed the
attachment
member toview
- Renamed the
- Renamed
RenderPassDepthStencilAttachmentDescriptor
toRenderPassDepthStencilAttachment
:- Renamed the
attachment
member toview
- Renamed the
- Renamed
VertexFormat
values- Examples:
Float3
->Float32x3
,Ushort2
->Uint16x2
- Examples:
- Renamed the
depth
value ofExtent3d
todepth_or_array_layers
- Updated blending options in
ColorTargetState
:- Renamed
BlendState
toBlendComponent
- Added
BlendState
struct to hold color and alpha blend state - Moved
color_blend
andalpha_blend
members intoblend
member
- Renamed
- Moved
clamp_depth
fromRastizerState
toPrimitiveState
- Updated
PrimitiveState
:- Added
conservative
member for enabling conservative rasterization
- Added
- Updated copy view structs:
- Renamed
TextureCopyView
toImageCopyTexture
- Renamed
TextureDataLayout
toImageDataLayout
- Changed
bytes_per_row
androws_per_image
members ofImageDataLayout
fromu32
toOption<NonZeroU32>
- Renamed
- Changed
BindingResource::Binding
from containing fields directly to containing aBufferBinding
- Added
BindingResource::BufferArray
- Renamed
- Infrastructure:
- switch from
tracing
toprofiling
- more concrete and detailed errors
- API traces include the command that crashed/panicked
- Vulkan Portability support is removed from Apple platforms
- switch from
- Validation:
- texture bindings
- filtering of textures by samplers
- interpolation qualifiers
- allow vertex components to be underspecified
- Fix build failure in rust 1.64 #2966
- expose
wgc::device::queue
sub-module in public - fix the indexed buffer check
- fix command allocator race condition
- Major API changes:
RenderPipelineDescriptor
BindingType
- Features:
- (beta) WGSL support, including the ability to bypass SPIR-V entirely
- (beta) implicit bind group layout support
- timestamp and pipeline statistics queries
- ETC2 and ASTC compressed textures
- (beta) targeting WASM with WebGL backend
- reduced dependencies
- Native-only:
- clamp-to-border addressing
- polygon fill modes
- query a format for extra capabilities
f64
support in shaders
- Validation:
- shader interface
- render pipeline descriptor
- vertex buffers
- Crates:
- C API is moved to another repository
player
: standalone API replayer and tester
- Features:
- Proper error handling with all functions returning
Result
- Graceful handling of "error" objects
- API tracing infrastructure
- uploading data with
write_buffer
/write_texture
queue operations - reusable render bundles
- read-only depth/stencil attachments
- bind group layout deduplication
- Cows, cows everywhere
- Web+Native features:
- Depth clamping (feature)
- BC texture compression
- Native-only features:
- mappable primary buffers
- texture array bindings
- push constants
- multi-draw indirect
- Proper error handling with all functions returning
- Validation:
- all transfer operations
- all resource creation
- bind group matching to the layout
- experimental shader interface matching with Naga
- add debug markers support
- fix destruction of adapters, swap chains, and bind group layouts
- fix command pool leak with temporary threads
- improve assertion messages
- implement
From<TextureFormat>
forTextureComponentType
- fix memory management of staging buffers
- fix reading access to storage textures
- another fix to layout transitions for swapchain images
- fix read-only storage flags
- fix pipeline layout life time
- improve various assert messages
- fix tracking of swapchain images that are used multiple times in a command buffer
- fix tracking of initial usage of a resource across a command buffer
- Crates:
wgpu-types
: common types between native and web targetswgpu-core
: internal API for the native and remote wrappers
- Features:
- based on gfx-hal-0.5
- moved from Rendy to the new
gfx-memory
andgfx-descriptor
crates - passes are now recorded on the client side. The user is also responsible to keep all resources referenced in the pass up until it ends recording.
- coordinate system is changed to have Y up in the rendering space
- revised GPU lifetime tracking of all resources
- revised usage tracking logic
- all IDs are now non-zero
- Mailbox present mode
- Validation:
- active pipeline
- Fixes:
- lots of small API changes to closely match upstream WebGPU
- true read-only storage bindings
- unmapping dropped buffers
- better error messages on misused swapchain frames
- improved swap chain error handling
- fixed render pass transitions
- fixed depth/stencil transitions
- fixed dynamic offset iteration
- Platforms: removed OpenGL/WebGL support temporarily
- Features:
- based on gfx-hal-0.4 with the new swapchain model
- exposing adapters from all available backends on a system
- tracking of samplers
- cube map support with an example
- Validation:
- buffer and texture usage
- fixed instance creation on Windows
- fixed pipeline barriers that aren't transitions
- Platforms: experimental OpenGL/WebGL
- Crates:
- Rust API is moved out to another repository
- Features:
- based on gfx-hal-0.3 with help of
rendy-memory
andrendy-descriptor
- type-system-assisted deadlock prevention (for locking internal structures)
- texture sub-resource tracking
raw-window-handle
integration instead ofwinit
- multisampling with an example
- indirect draws and dispatches
- stencil masks and reference values
- native "compute" example
- everything implements
Debug
- based on gfx-hal-0.3 with help of
- Validation
- vertex/index/instance ranges at draw calls
- bing groups vs their expected layouts
- bind group buffer ranges
- required stencil reference, blend color
- fixed frame acquisition GPU waits
- fixed submission tracking
- added support for blend colors
- fixed bind group compatibility at the gfx-hal level
- validating the bind groups and blend colors
- fixed vertex format mapping
- fixed building with "empty" backend on Windows
- bumped the default descriptor pool size
- fixed host mapping alignments
- validating the uniform buffer offset
- Platforms: iOS/Metal, D3D11
- Crates:
wgpu-remote
: remoting layer for the cross-process boundarygfx-examples
: selected gfx pre-ll examples ported over
- Features:
- native example for compute
- "gfx-cube" and "gfx-shadow" examples
- copies between buffers and textures
- separate object identity for the remote client
- texture view tracking
- native swapchain resize support
- buffer mapping
- object index epochs
- comprehensive list of vertex and texture formats
- validation of pipeline compatibility with the pass
- Fixes
- fixed resource destruction
- Platforms: Linux/Vulkan, Windows/Vulkan, D3D12, macOS/Metal
- Crates:
wgpu-native
: C API implementation of WebGPU, based on gfx-halwgpu-bindings
: auto-generated C headerswgpu
: idiomatic Rust wrapperexamples
: native C examples
- Features: - native examples for triangle rendering - basic native swapchain integration - concept of the storage hub - basic recording of passes and command buffers - submission-based lifetime tracking and command buffer recycling - automatic resource transitions