v131 ยท graphics
WebGPU: GPUCanvasContext getConfiguration()
Functionality added to the WebGPU spec after its first shipment in a browser. Once GPUCanvasContext configure() has been called with a configuration dictionary, the GPUCanvasContext getConfiguration() method lets developers check the canvas context configuration. It includes GPU device, format, usage, viewFormats, colorSpace, toneMapping, and alphaMode m
concepts
-
GPUCanvasContext.getConfiguration
GPUCanvasContext.getConfiguration() returns the active context configuration. Lets libraries inspect what the host set up.
-
Host + overlay handoff
Simulate a 3D library configuring the canvas and a custom overlay pass reading the active config back.
-
Configure โ getConfiguration round-trip
Pick every config field, call
configure(), read back. Confirm every value comes back exactly. -
Library handshake log
Host configures, overlay reads via
getConfiguration(). Compatibility verdict and log of the handshake.
why it shipped
The GPUCanvasContext getConfiguration() method returns the canvas context configuration. https://github.com/gpuweb/gpuweb/pull/4899