eliemichel / LearnWebGPU-Code

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

Step100 fixes #5

Closed mheistermann closed 1 year ago

mheistermann commented 1 year ago

Hallo! Thanks for the nice code and excellent documentation. I needed these changes to run the code on my Macbook Pro M1.

(Actually, they are not sufficient, imgui also requires a small change, a uniform is not aligned enough for what the driver wants. But I suppose most of this will be useful).

Of course some of the changes will also apply to other steps, step100 is just what i chose to try first.

I hope you'll find (some of) the changes useful :-)

mheistermann commented 1 year ago

Thanks for the lighting-fast response!

Also I'd be interested in the imgui fix you mention, so that I can port it to my imgui PR!

I added it as an extra commit, it is quite the hack though (hard-coded alignment to 256, and a bit fragile. Maybe having some extra type in there using alignas might be better).

Btw, once everything has been resolved, I'd do some rebasing/squashing to eliminate "fixup" commits, but I held off on that, as I'm afraid it might make discussing the iterations harder.

mheistermann commented 1 year ago

Superceded by https://github.com/eliemichel/LearnWebGPU-Code/pull/6