GPU frame timing on the Cesium renderer, where timer queries exist

With EXT_disjoint_timer_query_webgl2 the Cesium renderer lists gpuTiming:
while frame signals have listeners, each drawn frame is timed from preRender
to postRender and a signal carries gpuMs of the newest timing back (a
disjoint one is dropped); queries are reused and let go on dispose. Without
the extension it answers 'none', as before. The new conformance check
quality.signals.gpuTiming pins both; the stub's timed frames carry 0 ms.
This commit is contained in:
Sameh Khamis committed 2026-11-11 16:00:37 -08:00
1 parent 8122199887
commit c7bb08bfb4
7 files changed
+206 -7

No files matched your search

+5 -1
View File
@@ -22,7 +22,7 @@ import { createCesiumEffects } from './effects.js';
import { renderNow, willDraw } from './frame.js';
import { createCesiumGlobe } from './globe.js';
import { createCesiumQuery, queryCapabilities } from './query.js';
import { createCesiumQuality } from './quality.js';
import { createCesiumQuality, gpuTimerOf } from './quality.js';
import { screenModulationSupported } from './screenModulation.js';
import {
atEndOfTick,
@@ -30,6 +30,7 @@ import {
onEngineWorkCompleted,
renderPending,
trimGlobeTiles,
webglContext,
} from './internals.js';
export { listenerList, toCartesian };
@@ -87,6 +88,8 @@ export function cesiumCapabilities(scene, only) {
...(screenModulationSupported() ? ['screenModulation'] : []),
...GLOBE_CAPABILITIES,
...queryCapabilities(scene),
// Frame timing on the GPU, where the context has timer queries.
...(gpuTimerOf(webglContext(scene)) ? ['gpuTiming'] : []),
];
const allowed = only && new Set(only);
return all.filter(
@@ -361,6 +364,7 @@ export function createCesiumPorts(widget, { capabilities, credentials = {} }) {
frame,
report,
tickStarted: () => tickNow,
gl: capabilities.has('gpuTiming') ? webglContext(scene) : null,
});
const creditsPart = createCesiumCredits({