From 6cd6fb41ed44bd37bd05e5a4abf23661605c00df Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 28 Jan 2026 01:10:05 +0100 Subject: refactor(gpu): Integrate WebGPU via system wgpu-native and glfw3webgpu Replaces the complex wgpu-native submodule and manual platform-specific surface creation with a system-wide wgpu-native install (via Homebrew) and the glfw3webgpu helper library. - Updates scripts/project_init.sh to fetch glfw3webgpu and ensure wgpu-native is installed. - Refactors CMakeLists.txt to link against the system wgpu-native library. - Simplifies src/platform.cc to use glfwCreateWindowWGPUSurface. - Simplifies src/gpu/gpu.cc to use standard WebGPU headers. - Updates FETCH_DEPS.md with new installation instructions. - Updates PROJECT_CONTEXT.md with the new integration strategy. --- PROJECT_CONTEXT.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'PROJECT_CONTEXT.md') diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index 1ee929c..39f050c 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -49,6 +49,11 @@ Incoming tasks in no particular order: - `spectool`: A command-line tool for analyzing WAV/MP3 files into `.spec` spectrogram format and for playing back `.spec` files through the synth engine. - `specview`: A command-line tool for visualizing `.spec` spectrogram files in ASCII art. +### WebGPU Integration: +- **Strategy**: Uses system-installed `wgpu-native` (e.g., via Homebrew) for the implementation. +- **Surface Creation**: Uses `glfw3webgpu` helper library to abstract platform-specific surface creation from GLFW windows, keeping the codebase clean and cross-platform. +- **Headers**: Uses standard `` provided by the system install. + ### Coding Style: - **Standard**: Adopted a consistent coding style enforced by `.clang-format`. - **Rules**: 2-space indentation, no tabs, 80-column line limit. -- cgit v1.2.3