Device loss can cause async pipeline creation to succeed (vacuously) when it would normally have failed. The spec should require a reasonable ordering of device loss and async pipeline promises in this case.
Currently the "Promise Ordering" section says:
WebGPU does not make any guarantees about the order in which these promises settle (resolve or reject), except for the following:
Applications must not rely on any other promise settlement ordering.
However the list is not complete because in cases where the device becomes lost, GPUDevice.lost is always guaranteed to settle before any other promise. This is easily observable if device.destroy() is called before any of the other methods that return a promise.
Some relevant CTS tests:
https://gpuweb.github.io/cts/standalone/?q=webgpu:api,validation,state,device_lost,destroy:createComputePipelineAsync:*
https://gpuweb.github.io/cts/standalone/?q=webgpu:api,validation,state,device_lost,destroy:createRenderPipelineAsync:*
Device loss can cause async pipeline creation to succeed (vacuously) when it would normally have failed. The spec should require a reasonable ordering of device loss and async pipeline promises in this case.
Currently the "Promise Ordering" section says:
However the list is not complete because in cases where the device becomes lost,
GPUDevice.lostis always guaranteed to settle before any other promise. This is easily observable ifdevice.destroy()is called before any of the other methods that return a promise.Some relevant CTS tests:
https://gpuweb.github.io/cts/standalone/?q=webgpu:api,validation,state,device_lost,destroy:createComputePipelineAsync:*
https://gpuweb.github.io/cts/standalone/?q=webgpu:api,validation,state,device_lost,destroy:createRenderPipelineAsync:*