[PoC] Adapt example_glfw_wgpu to wgpu-native #7523
Open
+341
−88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: This PoC comes as a complement to a remark in #7435.
Problems:
example_glfw_wgpu
is tied to Dawn implementation for multiple reasons (see this comment).This PR shows an alternative version of
example_glfw_wgpu
that useswgpu-native
, and which is in general closer to what an implem-agnostic version would look like. It uses precompiled binaries, which makes building the example for quick testing much faster than building Dawn.Receipe to make this implem-agnostic:
FetchWgpuNative.cmake
by e.g., thewebgpu.cmake
file from my WebGPU-distribution repo (I did not want to impose this by default since I'm clearly biased in favor of my tool here -- my ultimate goal is that one day this whole distribution thing will no longer be needed).WEBGPU_BACKEND_WGPU
orWEBGPU_BACKEND_DAWN
themselves as well.Due to all these reason I suggest not to merge this right away, but keeping the PR as a reference may be useful for the very near future.