import {} from "../rendering/index.js";
export class DrawCallTracker {
    frame = 0;
    records = [];
    beginFrame() {
        this.frame += 1;
        this.records.length = 0;
    }
    record(command) {
        this.records.push({
            label: command.label ?? "draw",
            topology: command.topology,
            indexed: command.indexBuffer !== undefined,
            count: command.indexCount ?? command.vertexCount,
            shader: command.shader?.label ?? null
        });
    }
    capture(deviceDiagnostics) {
        const total = deviceDiagnostics?.drawCalls ?? this.records.length;
        return {
            frame: this.frame,
            total,
            records: [...this.records],
            zeroDrawCallFailure: total === 0
        };
    }
}
//# sourceMappingURL=DrawCallTracker.js.map