refactor(webgl): Move WebGL GAL from test harness to KiCad source tree
Migrate WebGL GAL implementation from tests/gal-regression/wasm/webgl/ to kicad/common/gal/webgl/ and kicad/include/gal/webgl/. This integrates the WebGL GAL properly into KiCad's build system: - Update test Makefile to use sources from kicad/ instead of local copies - Update build scripts for new source locations - Add test-gal-webgl.sh script for running WebGL regression tests - Update Docker to Emscripten 4.0.22 The WebGL GAL passes all 28 regression tests (matching baseline). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5e74a001e7
commit
37d973f064
50 changed files with 403 additions and 28977 deletions
|
|
@ -8,6 +8,11 @@
|
|||
# Uses a Makefile with direct em++ calls (like build-wasm-test.sh)
|
||||
# to avoid emcmake Python 3.10+ requirement.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/build-gal-webgl-test.sh # Clean build (default)
|
||||
# ./scripts/build-gal-webgl-test.sh --no-clean # Incremental build
|
||||
# ./scripts/build-gal-webgl-test.sh --debug # Debug build with source maps
|
||||
#
|
||||
|
||||
# Redirect all output to a log file (re-execs script with redirection)
|
||||
source "$(dirname "$0")/common/logging.sh"
|
||||
|
|
@ -37,18 +42,19 @@ fi
|
|||
echo " Emscripten: $(em++ --version 2>&1 | head -1)"
|
||||
|
||||
# Parse arguments
|
||||
# Default: clean build to avoid stale object file issues (header deps not tracked in old builds)
|
||||
DEBUG_BUILD=0
|
||||
CLEAN_BUILD=0
|
||||
CLEAN_BUILD=1
|
||||
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = "--debug" ]; then
|
||||
DEBUG_BUILD=1
|
||||
elif [ "$arg" = "--clean" ]; then
|
||||
CLEAN_BUILD=1
|
||||
elif [ "$arg" = "--no-clean" ]; then
|
||||
CLEAN_BUILD=0
|
||||
fi
|
||||
done
|
||||
|
||||
# Build using Makefile
|
||||
# Build using Makefile (compiles WebGL sources directly from kicad/)
|
||||
cd "$TEST_DIR"
|
||||
|
||||
if [ "$CLEAN_BUILD" = "1" ]; then
|
||||
|
|
@ -62,6 +68,7 @@ fi
|
|||
rm -f "$OUTPUT_DIR"/*.js "$OUTPUT_DIR"/*.wasm 2>/dev/null || true
|
||||
|
||||
# Generate shaders (converts GLSL 1.20 to GLSL ES 3.00)
|
||||
# TODO: Eventually these should come from KiCad's build
|
||||
echo ""
|
||||
echo "Generating WebGL shaders..."
|
||||
python3 generate_shaders.py
|
||||
|
|
|
|||
Loading…
Reference in a new issue