eliemichel / LearnWebGPU-Code

The accompanying code of the Learn WebGPU C++ programming guide
https://eliemichel.github.io/LearnWebGPU
MIT License
106 stars 28 forks source link

Release adapter after setting WGPUTextureFormat #42

Closed suny-am closed 3 months ago

suny-am commented 3 months ago

The adapter needs to be released after setting the WGPUTextureFormat in order to avoid kernel panics.

eliemichel commented 3 months ago

Oh indeed, thx. I'll have to update the guide as well then, since this code is generated from the guide itself to check that it is sound, and to make sure subsequent steps are updated as well (I only manually clean up comments/whitespaces).

suny-am commented 3 months ago

Thank you! ^^ In retrospect I probably should have opened a general issue instead since the steps build naturally on top of eachother; making this particular "fix" a bit redundant.

Once again, truly appreciate all your efforts on this project! Both your approach and implementation is very inspiring!

eliemichel commented 3 months ago

No worry, it's fine to report it this way, I don't expect people to fix all branches all the time! I'll merge your PR and fix the remaining ones myself (I'll merge when I'm sure I have the time ahead of me to updates others in the same batch otherwise I'll forget ;) )

suny-am commented 3 months ago

Appreciated!

Until then, it could be regarded as an informal "gotcha" for the reader; a good way to make sure one is paying attention ^^

eliemichel commented 3 months ago

I added a note in the guide, I'll update the accompagnying code later this week!