https://medium.com/@AlainGalvan/raw-webgpu-58522e638b17
chrome://flags/#enable-unsafe-webgpu
Safari > Develop > Experimental Features > WebGPU
request different adapter for different preference(ex: low-power)
https://en.wikipedia.org/wiki/Swap_chain
A swap chain is a series of virtual framebuffers
utilized by the graphics card and graphics API for frame rate stabilization and several other functions.
The swap chain usually exists in graphics memory, but it can exist in system memory as well. The non-utilization of a swap chain may result in stuttering rendering, but its existence and utilization are required by many graphics APIs.
A swap chain with two buffers is a double buffer.
present modes
to prevent tearing on different devices.createBuffer()
buffer.getMappedRange()
: get array buffer for CPU(js) from GPU.buffer.unmap()
: return the control back to GPU.Get the mapping of the exist GPU buffer via buffer.mapAsyc(mode, offset, size)
.
An application can request to map a GPUBuffer so that they can access its content via ArrayBuffers that represent part of the GPUBuffer's allocations. Mapping a GPUBuffer is requested asynchronously with mapAsync() so that the user agent can ensure the GPU finished using the GPUBuffer before the application can access its content. Once the GPUBuffer is mapped the application can synchronously ask for access to ranges of its content with getMappedRange. A mapped GPUBuffer cannot be used by the GPU and must be unmapped using unmap before work using it can be submitted to the Queue timeline.
WebGPU