webgpu-native / webgpu-headers

**NOT STABLE YET!** See README.
https://webgpu-native.github.io/webgpu-headers/
BSD 3-Clause "New" or "Revised" License
391 stars 45 forks source link

Remove DeviceLost status from WGPUSurfaceGetCurrentTextureStatus #397

Closed kainino0x closed 1 week ago

kainino0x commented 2 weeks ago

~We didn't discuss which status we would use for this, but "Lost" seems to makes sense.~ This should behave like JS where we pretend it worked by returning a texture, but you can't use it because the device is lost.

Issue #209

Kangz commented 2 weeks ago

Technically the connection to the X server being severed, and the device being lost are two different things. But IDK that an application can usefully handle one while not handling the other so LGTM.

kainino0x commented 1 week ago

I just realized... in JS if you getCurrentTexture on a lost device, you just get an invalid texture (well, a texture that you can't observe is valid, because the device is lost). That is probably needs to be done here, to match - it's not exactly possible in JS or on remoting implementations to do what I wrote here, because you don't know synchronously when the device is lost. Hopefully this isn't a problem for non-remoting native....

Revised.