webgpu-native / webgpu-headers

https://webgpu-native.github.io/webgpu-headers/
BSD 3-Clause "New" or "Revised" License
370 stars 43 forks source link

Move .suboptimal to .status=SuccessSuboptimal #338

Closed kainino0x closed 1 week ago

kainino0x commented 1 week ago

Fixes #257 dawn issue https://crbug.com/367401498

NOT stable yet, this is just one change to the presentation API, more coming: https://github.com/webgpu-native/webgpu-headers/labels/presentation

Kangz commented 1 week ago

I'm kind of lukewarm on this change because I just fixed an issue related to this in Dawn's Vulkan backend. Though the names suggest that there are more options than just SuccessOptimal.

kainino0x commented 1 week ago

I was worried about that exact scenario too, it's interesting to see that it actually happened in Dawn...

I am not super attached to this change, but yeah I think that the name SuccessOptimal will prevent bugs like that one (and the fact that we use a custom result enum here).