wgpu-core
relies on undocumented properties of wgpu-hal
's GL backend when targeting WebGL
#6538
Labels
area: api
Issues related to API surface
area: documentation
Documentation for crate items, public or private
type: enhancement
New feature or request
#6413 added the following comment:
Vulkan, D3D12 and (optionally) Metal require us to keep objects used in active submissions alive until the GPU has finished working with them.
wgpu-hal
inherits this rule from those backends but OpenGL doesn't have this requirement and due to limitations on the web where a blocking wait can't be issued we make use of this property inwgpu-core
.The 2nd issue is that
map_buffer
is synchronous with respect to the other previously enqueued GL commands which we also take advantage of. The other backends and the OpenGL/OpenGL ES targets of our GL backend will map buffers immediately (even if the GPU is still using them).We might be able to resolve this with just an
is_webgl
getter on the HAL device and document this in HAL.The text was updated successfully, but these errors were encountered: