Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ jobs:
runner: macos-15
- name: macos-x64
runner: macos-15-intel
runtime_smoke: false
angle_platform: swiftshader
- name: windows-x64
runner: windows-latest
- name: windows-arm64
runner: windows-11-arm

env:
# Intel hosted runners exercise software rendering; other jobs use defaults.
ANGLE_DEFAULT_PLATFORM: ${{ matrix.angle_platform || '' }}

steps:
- name: Check out
uses: actions/checkout@v4
Expand Down Expand Up @@ -77,35 +81,29 @@ jobs:
run: npm run test:swiftshader

- name: Smoke test WebGL2 bindings on Linux
if: runner.os == 'Linux' && matrix.runtime_smoke != false
if: runner.os == 'Linux'
run: xvfb-run -a npm test

- name: Smoke test three.js integration on Linux
if: runner.os == 'Linux' && matrix.runtime_smoke != false
if: runner.os == 'Linux'
run: xvfb-run -a npm run test:three

- name: Smoke test twgl.js integration on Linux
if: runner.os == 'Linux' && matrix.runtime_smoke != false
if: runner.os == 'Linux'
run: xvfb-run -a npm run test:twgl

- name: Smoke test WebGL2 bindings
if: runner.os != 'Linux' && matrix.runtime_smoke != false
if: runner.os != 'Linux'
run: npm test

- name: Smoke test three.js integration
if: runner.os != 'Linux' && matrix.runtime_smoke != false
if: runner.os != 'Linux'
run: npm run test:three

- name: Smoke test twgl.js integration
if: runner.os != 'Linux' && matrix.runtime_smoke != false
if: runner.os != 'Linux'
run: npm run test:twgl

- name: Skip runtime smoke
if: matrix.runtime_smoke == false
run: |
echo "Build and link are validated for ${{ matrix.name }}."
echo "Runtime smoke is skipped because ANGLE EGL display creation is not reliable on GitHub-hosted macOS x64 runners."

wsl-smoke:
name: Experimental WSL smoke
runs-on: windows-2025
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@ through WebGL2-compatible JavaScript method names.
| Linux x64 | ![tested](https://img.shields.io/badge/CI-tested-brightgreen) |
| Linux arm64 | ![tested](https://img.shields.io/badge/CI-tested-brightgreen) |
| macOS arm64 | ![tested](https://img.shields.io/badge/CI-tested-brightgreen) |
| macOS x64 | ![build only](https://img.shields.io/badge/CI-build%20only-yellow) |
| macOS x64 | ![tested](https://img.shields.io/badge/CI-tested-brightgreen) |
| Windows x64 | ![tested](https://img.shields.io/badge/CI-tested-brightgreen) |
| Windows arm64 | ![tested](https://img.shields.io/badge/CI-tested-brightgreen) |

macOS x64 is build-only in CI because hosted-runner smoke currently hits
`Error: No display`.

## Extension Support

`getSupportedExtensions()` reports WebGL extension names, not raw `GL_*` ANGLE
Expand Down
32 changes: 17 additions & 15 deletions test/webgl2-smoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,24 +476,26 @@ function testDisjointTimerQueryWebGL2(gl) {
assert(Number.isInteger(bits) && (bits === 0 || (bits >= 30 && bits <= 64)),
"timer counter bits should be zero or between 30 and 64");
}
gl.getParameter(ext.GPU_DISJOINT_EXT); // Start the timestamp validity interval.

const query = gl.createQuery();
ext.queryCounterEXT(query, ext.TIMESTAMP_EXT);
gl.finish();
assert.strictEqual(
gl.getQueryParameter(query, gl.QUERY_RESULT_AVAILABLE), true);
const timestamp = gl.getQueryParameter(query, gl.QUERY_RESULT);
assert.strictEqual(typeof timestamp, "number");
const timestampDisjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
// EXT_disjoint_timer_query permits zero-bit counters (e.g. D3D11 timestamps).
if (timestampBits === 0) {
assert.strictEqual(timestamp, 0, "zero-bit timestamp counters should return zero");
} else if (!timestampDisjoint) {
assert(timestamp > 0, "timestamp query should return a positive value");
// Timestamp measurement is optional. Metal advertises zero bits and leaves
// queryCounter unimplemented; elapsed-time queries are still supported.
if (timestampBits > 0) {
gl.getParameter(ext.GPU_DISJOINT_EXT); // Start the timestamp validity interval.
const query = gl.createQuery();
ext.queryCounterEXT(query, ext.TIMESTAMP_EXT);
gl.finish();
assert.strictEqual(
gl.getQueryParameter(query, gl.QUERY_RESULT_AVAILABLE), true);
const timestamp = gl.getQueryParameter(query, gl.QUERY_RESULT);
assert.strictEqual(typeof timestamp, "number");
const timestampDisjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
if (!timestampDisjoint) {
assert(timestamp > 0, "timestamp query should return a positive value");
}
gl.deleteQuery(query);
}
gl.deleteQuery(query);

gl.getParameter(ext.GPU_DISJOINT_EXT); // Start the elapsed validity interval.
const elapsedQuery = gl.createQuery();
gl.beginQuery(ext.TIME_ELAPSED_EXT, elapsedQuery);
gl.clearColor(0.25, 0.5, 0.75, 1);
Expand Down
Loading