eliemichel / LearnWebGPU-Code

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

Fixed double gpu devices drawing bug on windows #20

Closed sleeplessai closed 10 months ago

sleeplessai commented 1 year ago

Fixed the issue #19 Windows system could tend to select the integrated graphics device instead of a dedicated one to construct the WGPUAdapter object, which would cause wrong rendering results. In this step, I can only get the right results on Linux because a dedicated GPU is default device when driver ready. On Windows, in my case, the default choice is Intel integrated GPU, which causes the tricky problem.

sleeplessai commented 1 year ago

Another suggestion for the tutorial book is that, Adapter section should add Adapter.getProperties() introduction and talk more about how to choose the wanted/recommended device to render context (By setting the PowerPreference of AdapterOptions). That will make readers better understand the relation between Adapter and Device. The reason is the correct physical device certainly decides the limitations of features whose differences are almost hidden by WebGPU interface.

eliemichel commented 1 year ago

Mmh good catch. However, I do not see in WebGPU spec that dynamic uniforms are not supported everywhere, so this is a true bug of wgpu-native I think.

sleeplessai commented 1 year ago

Mmh good catch. However, I do not see in WebGPU spec that dynamic uniforms are not supported everywhere, so this is a true bug of wgpu-native I think.

I will summit the issue to webgpu-native. I don't install latest Arc driver for my intel integrated gpu, guess this may cause a broken Vulkan implementation.