Unset vertex buffer
Passing null
rather than a GPUBuffer
to setVertexBuffer()
on GPURenderPassEncoder
or GPURenderBundleEncoder
allows you to unset a previously set vertex buffer in a given slot. See issue dawn:1675.
// Set vertex buffer in slot 0.
myRenderPassEncoder.setVertexBuffer(0, myVertexBuffer);
// Then later, unset vertex buffer in slot 0.
myRenderPassEncoder.setVertexBuffer(0, null);
Unset bind group
Passing null
rather than a GPUBindGroup
to setBindGroup()
on GPURenderPassEncoder
or GPURenderBundleEncoder
allows you to unset a previously set bind group in a given slot. See issue dawn:1675.
// Set bing group in slot 0.
myRenderPassEncoder.setBindGroup(0, myBindGroup);
// Then later, unset bind group in slot 0.
myRenderPassEncoder.setBindGroup(0, null);
Silence errors from async pipeline creation when device is lost
The createComputePipelineAsync()
and createRenderPipelineAsync()
methods of GPUDevice
return a promise which resolves when the creation of the pipeline has completed. From now on, errors from async pipeline creation will be silenced when the GPUDevice
is lost
to make lost devices appear to function as much as possible. See dawn issue:1874.
SPIR-V shader module creation updates
Creating a SPIR-V shader module with createShaderModule()
now throws a TypeError unless you run Chrome with the "Unsafe WebGPU Support" flag as SPIR-V is not part of the WebGPU specification. Prior to this change using SPIR-V would cause a GPUInternalError to be generated instead.
See change chromium:4711911.
Improving developer experience
The validation error message for bind group layout bindings in vertex shader has been improved for read-write storage buffer and write-only storage texture bindings. See issue dawn:1883.
Caching pipelines with automatically generated layout
Pipelines created with createRenderPipeline({ layout: "auto" })
now take advantage of caching mechanisms in Chrome. It means that these pipelines will be created more efficiently and will use less memory. See issue dawn:1933.
Dawn updates
The wgpu::RequestAdapterOptionsBackendType
is now part of wgpu::RequestAdapterOptions
to make it easier for applications to request a particular backend when getting an adapter. See the following example and issue dawn:1875.
wgpu::RequestAdapterOptions options = {
.backendType = wgpu::BackendType::D3D12};
// Request D3D12 adapter.
myInstance.RequestAdapter(&options, myCallback, myUserData);
Several additional methods have been implemented for Node.js. See change dawn:142465.
The webgpu.h C API has changed its type for boolean values from stdbool
to WGPUBool
, which is a uint32_t
. This change was made to ensure that the API has an equivalent ABI in C and C++.
This covers only some of the key highlights. Check out the exhaustive list of commits.
What's New in WebGPU
A list of everything that has been covered in the What's New in WebGPU series.
Chrome 129
Chrome 128
- Experimenting with subgroups
- Deprecate setting depth bias for lines and points
- Hide uncaptured error DevTools warning if preventDefault
- WGSL interpolate sampling first and either
- Dawn updates
Chrome 127
- Experimental support for OpenGL ES on Android
- GPUAdapter info attribute
- WebAssembly interop improvements
- Improved command encoder errors
- Dawn updates
Chrome 126
- Increase maxTextureArrayLayers limit
- Buffer upload optimization for Vulkan backend
- Shader compilation time improvements
- Submitted command buffers must be unique
- Dawn updates
Chrome 125
Chrome 124
- Read-only and read-write storage textures
- Service workers and shared workers support
- New adapter information attributes
- Bug fixes
- Dawn updates
Chrome 123
- DP4a built-in functions support in WGSL
- Unrestricted pointer parameters in WGSL
- Syntax sugar for dereferencing composites in WGSL
- Separate read-only state for stencil and depth aspects
- Dawn updates
Chrome 122
- Expand reach with compatibility mode (feature in development)
- Increase maxVertexAttributes limit
- Dawn updates
Chrome 121
- Support WebGPU on Android
- Use DXC instead of FXC for shader compilation on Windows
- Timestamp queries in compute and render passes
- Default entry points to shader modules
- Support display-p3 as GPUExternalTexture color space
- Memory heaps info
- Dawn updates
Chrome 120
- Support for 16-bit floating-point values in WGSL
- Push the limits
- Changes to depth-stencil state
- Adapter information updates
- Timestamp queries quantization
- Spring-cleaning features
Chrome 119
- Filterable 32-bit float textures
- unorm10-10-10-2 vertex format
- rgb10a2uint texture format
- Dawn updates
Chrome 118
- HTMLImageElement and ImageData support in
copyExternalImageToTexture()
- Experimental support for read-write and read-only storage texture
- Dawn updates
Chrome 117
- Unset vertex buffer
- Unset bind group
- Silence errors from async pipeline creation when device is lost
- SPIR-V shader module creation updates
- Improving developer experience
- Caching pipelines with automatically generated layout
- Dawn updates
Chrome 116
- WebCodecs integration
- Lost device returned by GPUAdapter
requestDevice()
- Keep video playback smooth if
importExternalTexture()
is called - Spec conformance
- Improving developer experience
- Dawn updates
Chrome 115
- Supported WGSL language extensions
- Experimental support for Direct3D 11
- Get discrete GPU by default on AC power
- Improving developer experience
- Dawn updates
Chrome 114
- Optimize JavaScript
- getCurrentTexture() on unconfigured canvas throws InvalidStateError
- WGSL updates
- Dawn updates