Commit graph

665 commits

Author SHA1 Message Date
Admin
63b48a0de5 Map: packed vertex format live — 19 f32 (76B) -> 12 slots (48B) per vertex
VectorVertexPacked: f16 pairs (uv, dist+shape, param0+3, param1+2, clipr)
and unorm8x4 color bitcast into f32 slots, unpacked by the new shader
intrinsics; positions, stroke_mult sentinels, param4 icon composite,
param5 depth ladder and zbias stay f32. Emitters unchanged — one packer
runs at upload (map tiles + generic vector picture path). -37% vertex
fetch bandwidth across every map buffer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
7ee121d2f6 Map: 3D LOD radii tilt-aware — full frustum keeps 3D, only deep horizon sinks
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
2c8cfd79d5 Map: 3D distance LOD sinks heights instead of alpha-fading (no see-through walls)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
9feb1ebfee Map: 3D-volume LOD — walls/trees/roofs split to fill_3d, ground-circle distance fade
The 3D suffix between the fills and buildings laps splits off; the draw
fades it from 0.75 to 1.5 viewport-heights around the view focus. Under
tilt the far (blurred) field skips the bulk of the fill vertex mass;
flat views are inside the near radius everywhere.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
f1a883729b Map: fringe band split — AA skirts skipped at strong tilt (~2/3 of casing verts)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
d63b4732b4 Map: icon zoom-banding — street-band icons (floor>16) split to a gated pass
Post-build O(n) partition on the per-vertex zoom-floor slot; pass 4 draws
the band only at view >= 16.25. Kills millions of shader-collapsed icon
verts per frame at mid zooms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
097a57ab70 Metal: MAKEPAD_GPU_PROFILE=1 per-pass GPU profiler + gpu_ms in map frame log
Per command buffer: pass debug name, GPU start->end interval, draw calls,
vertices, instances, upload bytes — accumulated and printed as a 1Hz
table from the completion threads. Map frame stats gain gpu_ms/gpu_max
from the existing PERF_CHANNEL_GPU ring.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
e61b9af7fc Fix all compile warnings across map crates (unused mut/import, key visibility)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
ec3c78e892 Map: frame-stats logger splits icons_ms/tail_ms — hunting the 10ms draw baseline
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
fea68f8c22 Map: labels pan/zoom on the GPU — cam_scale/cam_shift uniforms, glyphs emit in cached space
The cache-hit path re-emitted every glyph CPU-side with the pan shift
baked into vertices; under tilt that visibly trailed the tile geometry
(which pans purely by uniform). The pan/zoom delta now rides two new
uniforms applied before the existing camera-delta matrix, in the same
frame as map_offset — labels physically cannot lag the map. Pin-interior
text keeps constant px via a billboard instance flag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
7b02d81023 Map: labels ride the pan — re-place at rest, not every 48px/125ms mid-gesture
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
075f8ed507 Map: switch-only integer keyframes 15-18 (face morph stays opt-in experiment)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
85c1c1a531 Map: morph offsets = smoothed direction x full half-width (constant-width morph)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
c6c5197a10 Map: fringe outer-carrier verts ride rigidly with their boundary partner
Pinned carriers stretched the 1px AA band into a wide smear at corr>1 —
the dirty road edges across the morph band.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
db0f938621 Map: smooth morph-offset vectors along rings — clean interpolation path
At the keyframe corr==1 cancels offsets entirely, so ring-circular 1-2-1
smoothing (3 passes) costs zero keyframe fidelity; mid-morph the edge no
longer saw-tooths where junction wrap-arounds swing miter direction
per vertex.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
edc4c433e0 Map: clamped face_correction uniform + face expand-class band — stale cross-band tiles widen, never invert
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
a7a11c670b Map: bake deck shadows into the shadow section — the last unbaked boolean
The deck-shadow dissolve ran after the bake sink's early return, so no
cut ever contained it and every dz-covered street tile paid ~59ms at
runtime (found via emit-section fencing: ebuild=59). Extracted
dissolve_deck_shadows; the sink concatenates it into the baked shadow
shapes (concat == today's two separate emits exactly); a shadow HIT now
gates the runtime block off. Also: face-arm/stroke-arm/events laps, icon
template cache, batched expanded writer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
83782badc0 Map: icon mesh template cache — memcpy + 4-slot patch per instance
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
82caed10d3 Map: band-top keyframes (15,18) + face-morph file flag
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
406c26c0b6 Map: face morph opt-in (MAKEPAD_FACE_MORPH=1) — inward morph inverts narrow features
Serving above the keyframe needs corr<1 (inward): narrow union features
self-cross into bowties, junction-pinned verts tear shards (user
screenshot, city center). Redesign queued: band-TOP keyframes (15,18)
so corr>=1 everywhere — outward-only morph is opaque-safe. App stable
pinned meanwhile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
c8062a4ad4 Map: morph offsets survive dz subdivision — decked city faces morph too
subdivide_face_mesh_morph carries the offset channel (midpoints average
endpoints); decked bodies emit via the expanded layout with per-vertex
deck override. Fixes the magnified-wide roads across bridge-dz coverage
(all central Amsterdam) at deep zoom.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
9893c8acc2 Map: tree template instancing + stalk-clearance cell grid
Street trees memcpy one origin-built mesh (anchor+zbias patch); icon
stalk clearance queries a building-ring cell grid instead of scanning
icons x groups x rings. Worst AMS 368 -> ~310ms serial.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
b8a126c47b Map: bounded point-key whitelist at the icon horizon — detail-merge 137 -> 54ms
The icon matchers read a finite key set; parsing micro-POI layers with
the whitelist off was ~140ms/tile at kf16. Worst AMS 504 -> 368ms serial.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
b99f328f01 Map: distance-first tile eviction + self-scaling byte budget (street-zoom thrash)
Icon-horizon tiles run 50-85MB; a fixed 1.2GB budget sat below
visible+pan-ring at street zoom and pure LRU evicted the very neighbors
a circling pan re-enters — every loop around a center rebuilt its ring.
Budget now grows to hold 2x the visible set and eviction orders by
distance from the view center (LRU only as tiebreak): the ring survives,
the trail is what dies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
def3afd360 Map: morphable faces steps 3-5 — band-100 face emit, two-keyframe buckets, icon horizon
Morphable (flat, opaque, non-emissive) face bodies+fringes emit through
append_expanded_stroke_geometry (anchor = pos - miter*hw_key): the live
zoom re-widths them per frame via the existing width_correction path, and
the expanded branch already zeroes the fragment params faces with glow
would need — those stay pinned. render_bucket collapses to keyframes
{<=14 native, 15->14, >=16 -> 16}; icons include to a z18 horizon from
the high keyframe and reveal via the live icon_zoom uniform (mechanism
existed). Existing v3 streams serve both keyframes unchanged — the only
restyle event left on the zoom axis is the single 14<->16 crossover.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
91ddbd0061 Map: morphable faces step 2 — PaintFace carries per-vertex morph offsets
build_paint_faces maps every outline vertex's exact f32 coords to its
miter normal and emits offsets (normal x keyframe half-width) parallel to
body and fringe verts; junction blends, clip cuts, carrier outer edges
and translucent groups pin at zero.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
a23105c890 Map: morphable faces step 1 — ring_outward_normals (miter, winding-aware) + test
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
781dd2c83e Map: bucket ceiling 17 + bake buckets 14-17 (rz18+ magnifies bucket 17)
5-bucket streams priced at ~2.6x (=130GB archive) — clamped instead:
rz18 shows bucket-17 geometry like any mid-gesture frame, GPU strokes
re-derive widths, nav icons survive. Consumption window 10..=18 stays
(harmless; ceiling makes >17 unreachable).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
c2448ae0a9 Map: bake T3 building shadows into v3 faces buckets — docklands 2.7s -> 97ms
BakedFacesBucket v3 carries the dissolved shadow shapes + grounded
footprints under their own input signature (job rings/heights, sun,
scale, min-edge); the runtime shadow block on a HIT skips
sweep/dissolve/diff/open wholesale and tessellates the baked shapes
(b-sh-baked 0.5ms vs 0.2-2.6s). bake_tile_paint_faces now builds 3D so
the shadow pass runs at bake time; faces signatures are road-only and
stay valid. Night/dynamic-sun themes gate at bake_shadows and simply
never submit the shapes. Theme-independence test passes on v3; NL smoke:
8418/5388 2.7s -> 97ms, 8417/5387 1.6s -> 134ms, worst AMS rz16 258ms
honest (was 611ms with runtime shadows).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
d6f5084ad7 Map: honest shadow profiling — probe bakes shadows like the app, b-sh-* laps
The headless probe theme ran with bake_shadows OFF while every app theme
runs it ON, so all headless profiles silently skipped the shadow pass —
'155ms worst tile' excluded the 0.2-2.6s shadow dissolve the app pays
(user's 1.6-3.1s dockland tiles reproduce exactly now). Probe now bakes
shadows; b-jobs/b-sh-sweep/-dissolve/-diff/-open laps split the stage.
Buildings-buffer pre-reservation REVERTED (first-touch of ~240MB zero
pages per builder serialized 12 workers on the kernel fault path: 340ms
-> 3000ms in-app). Minkowski-sweep shadow silhouette tried and REVERTED
(epsilon-concave rings hand i_overlay self-crossing polygons, 10-15s;
also: f32-grid arithmetic in shadow geometry is load-bearing — f64-exact
translated points changed boolean coincidences and tripled dissolve
time). Real fix queued: bake dissolved shadow shapes per bucket.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
627f0bb04b Map: app reads .mkmap shards — MkmapReader + TileArchiveReader, varint-KV index v2
libs/mbtile_reader gains the .mkmap consumer: root.mkidx parse (Hilbert
tile ids, root ranges -> brotli leaf directories -> shard/offset/len),
positioned shard reads, same get_metadata/get_tile_decoded surface as
MbtilesReader; TileArchiveReader sniffs the path so mbtiles_path can
point at either. Index format v2 drops JSON: the metadata section is now
varint KV like the leaves (writer + reader; no serde in the container).
Loader, zoom-range probe and the headless harness go through the enum;
bridge-dz/overlay sidecars stay mbtiles. Harness parity via shards:
worst AMS rz16 164.7ms, z12 native 51.3ms — identical to mbtiles. App
repointed to local/maps/europe-base-br.mkmap (111 shards + root.mkidx,
the exact bytes a CDN would serve).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
b77bce2a61 Map: theme-independent paint structure — one faces bake for light/dark/circuit
Road-surface tier identity (RoadSurfaceKey) now carries a theme-stable
class id (fnv of the styling rule's kind) plus geometric fields instead of
resolved colors; identically-styled rules alias to one canonical id at
theme compile so kinds a theme paints the same still union as one tier.
Plaza grouping keys on alpha alone (road-polygon fills are one theme
constant). The bake input signature contains no colors, so recolor-only
themes (night, circuit city — user contract: themes only recolor, shadows
fade via alpha) share one baked stream: proven by
baked_faces_theme_independent (5 keys, identical signatures + regions
under a full recolor via probe_compiled_theme_recolored). Light output:
fills byte-equal, casing within 0.3% (same-rank painter tiebreak moved
from color values to class ids — visual check pending).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
e1b71501ec Map: v2 baked-faces input signature — skip tier ring construction on HIT
The bake guard now hashes the ring-construction INPUT (tier order/styles,
smoothed way points+dz, plaza rings, joint/portal end sets, clip) with a
deterministic FNV std-Hasher instead of hashing the constructed rings, so
a HIT skips road_ribbon_rings + per-ring field classification wholesale:
rings+fields 35.7 -> 0.8ms, worst AMS rz16 3D 224 -> 155ms (NL v2 bake,
byte-equal buffers vs the runtime cascade kill switch). BAKED_FACES_VERSION
2 rejects v1 streams (old semantic) into the safe fallback. Also: part-
centroid cell grid for the building cover test (buildings 25.5 -> 13.6ms,
Paris was 56ms), lookup-only cell maps switch SipHash for a multiply-rotate
hasher (DzField::sample), VisibleRegions: Clone for the OOB-region guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
3aa81131b7 Map: way-bbox grid for endpoint join passes + batched 19-float vertex appends
Replaces the remaining linear bbox scans in grade-through/flush-ends with
a 16-unit cell grid (candidates stay in ascending way order, so
first-match semantics survive); append helpers now extend_from_slice one
19-float record with reserved capacity. 7-tile rz16 sweep + z12 byte-equal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
68b950f3e3 Map: mid-zoom cascade bake + O(n^2) road-join prefilters — z12 city 661 -> 100ms
The zoom-out pyramid was never baked: z11-13 city tiles ran the full
painter cascade at runtime (z12 AMS 340ms cascade, 661ms build). map_bake
gains --zooms (native bucket below z14) and the renderer accepts baked
buckets 10-16; NL smoke bake: 861 tiles/55MB/31s, z13 166->19ms,
z11 252->28ms. Remaining z12 cost was two quadratic endpoint passes over
4017 join ways: bbox+reach prefilters and an endpoint hash grid cut
grade-through 103->33ms and flush-ends 98->3ms, bit-identical (every gate
is half-width-bounded; buffer sizes byte-equal across the sweep). Also
sp-* sub-laps in stroke-prep.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
9ea980a8da Map: corridor-segment grid + detail tag whitelist — worst tiles 383/300 -> ~235/226ms
Deck matching was O(verts x corridor segments) per stroke (84ms on the
worst AMS tile): per-tile CorridorGrid + mirrored-pair reuse cut it to
4ms, bit-identical (MAKEPAD_CORRIDOR_VERIFY oracle, MAKEPAD_CORRIDOR_BRUTE
fallback). Detail-merge parsed all six osm_* layers with full tags
(~110ms/tile constant): per-geometry-class layer skip + tag-key whitelist
below icon zooms cut it to 28-40ms; whitelist audited against style.rs
readers ('tunnel' omission flipped Paris plaza rings and MISSed the baked
cascade — CASCADE-GROUP dump + 7-tile size-parity sweep now guard it).
Full-build stage laps (payload/baked/dz/mvt-parse/detail-merge) close the
former ~110ms accounting gap; MAKEPAD_TILE_HASH prints a buffer fnv.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
9bddc458b9 Map: painter-cascade per-bucket bake (v2-faces-1) + z14 streets merge
- The boolean union cascade (59-77% of heavy tile builds) is now baked
  per (tile, bucket 14/15/16) as additive field 101: cascade output made
  deterministic (1/64 grid snap, canonical ring order, sorted tiers) and
  bit-reproducible; renderer consumes guarded by structure signature +
  coordinate checksum with runtime fallback; MAKEPAD_NO_BAKED_FACES=1.
  Roundtrip bit-identical on all keys x buckets x dz configs. New
  tools/map_bake producer (worker-pool incl. worker-side brotli).
- z14 streets merging never ran (early-out at DETAIL_ZOOM): fixed —
  1957->1285 ways (-34%), payload -20MB, cascade input shrunk at source.
- Slow-tile log now prints per-stage ms + a ready-to-paste headless repro
  command; harness honors archive/detail/dz/overlay/rz/3D envs.
- Worst AMS tile: 2-3s cold -> 175ms rz16 (61ms native); NL bake data
  882MB at 60ms threshold; Europe needs threshold 150ms + 2 buckets to
  fit shard budget (+2-4GB est).
- App -> nl-base-br3-faces archive; bridge-dz rebake required (joins
  fail closed against br3 feature indices).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
92c6139860 Map: fix build-24 livelock — never drop completed tile results
The stale-bucket result drop compared buffers.render_zoom (request-zoom
space, clamped to the archive max) against render_bucket() (unclamped):
never equal at overzoom, so EVERY completed tile at building zooms was
discarded, re-requested and discarded again — one-tile viewport, stuck
queues. Stale-bucket results are drawable; the bucket-restyle path
rebuilds them properly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
b1329124eb Map: layer-skip, keep-stale fixes, tilt priority, cancellation, budgets
- Regression attributed: the combined archive's six osm_* detail layers
  were wholesale-ingested and STYLED by the base parse (roads double-
  styled via streets + osm_lines: union input 946->3940 rings, stroke
  prep 26x) -> 2.1-5.5x slower than the old two-archive pair. Layer-level
  lazy skip (MvtSink::wants_layer): unconsumed layers skip as raw bytes
  in both passes; all 24 profile cells improve 1.3-2.3x.
- Gray-tile keep-stale: three kill paths fixed — mark_tile_failed no
  longer replaces drawable Ready entries with gray placeholders on batch
  errors (archive rewrites), transient absent reads no longer evict
  Ready meshes + 30s blacklist, retry backoff moved to TileEntry.
- Tilt-aware request priority (camera-projected screen distance with
  toward-camera bias) — the near field builds first under tilt.
- Restyle bursts lift the 4-slot gesture throttle to 12; queued jobs for
  dead zoom/bucket/mode are pruned (TagThreadPool::retain_queued), stale
  results dropped pre-upload; uploads byte-budgeted (24MB/frame).
- Stage matrix: painter-order union cascade = 59-77% of every cell
  (~320-350ms worst key) — per-bucket face bake is the path to <200ms.
- Baked-fill strips: A/B shows no measurable win post fill-tessellator
  optimization -> removal recommended (dissolve stays).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
c7f5a44019 Tessellator: 5.8x fill tessellation + baked-strip fast path
- Sign probe was 57-76% of z9/z13 fill cost (point_in_fill_rule scans all
  contours per probe): exact bbox prefilter (always on, bit-identical) +
  trusted-winding map-only mode (holes take the exterior's sign; bowties
  and orphan slivers keep the probe). Sweep rework: persistent zero-alloc
  tessellator, events sorted once + cursor (BinaryHeap::pop was 40% of
  fill CPU), ~V events instead of 2V, direct index output. 4.4-7x per
  tile, worst per-fill 42.9ms -> 4.5ms, 6798/6798 fixture fills
  bit-identical in both modes. MAKEPAD_TESS_DUMP fixture capture +
  fixture_bench with per-stage split.
- Baked-fill fast path (v2-fills-1, flat mode): field-100 strip decode,
  per-triangle Sutherland-Hodgman clip to the fill overlap rect, edge AA
  via new Tessellator::fill_fringe_into over the deduped rings; 5% area
  guard falls back to runtime tess — and caught a real emitter bug
  (inverted ring winding on z13 water would have erased a water body).
  MAKEPAD_NO_BAKED_FILLS=1 kill switch; baked_fill_audit headless test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
386722c473 Map: headless tile-build profiler (reproduces in-app slow tiles exactly)
cargo test -p makepad-widgets --features maps --release profile_tile_build
-- --ignored --nocapture ; TILE_PROFILE_KEYS/REPS/ARCHIVE env overrides.
Uses the real probe theme (a default CompiledMapTheme styles nothing and
skips tessellation). Baseline: z9 water/landuse giants at 0.67ms/feature
vs 0.02 at z13 — vertex-heavy undissolved polygons dominate; decode 3-5ms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
d8e0811baa Map: fix combined-archive double parse below z14; gesture-aware dispatch
- The combined-archive detail reuse handed the base blob back as detail
  at EVERY zoom, but detail layers exist only at z14 — mid-zoom tiles
  (already 10-20x heavier than the versatiles ones) were parsed twice,
  up to 3.5s per z9 tile. Detail reuse now gates on z>=14.
- While a zoom gesture is live only the 4 most-central tiles dispatch
  (12 after settling): every dispatched job runs immediately on the
  14-thread pool, so speculative edge giants were pinning all slots and
  the zoom target's center waited multiple seconds.
- Slow-tile forensics stay: builds >150ms log key/bytes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
fd51e26d09 Map: center-out tile loading; single decode for combined archives
- Tile requests now dispatch nearest-the-viewport-center first: keys were
  row-major and the 12-slot in-flight cap filled corners before the
  center, which became visible once per-tile cost grew.
- Combined base+detail archives (pbf-base single-file mode) no longer
  brotli-decode every z14 blob twice through a second reader on the same
  file — the base bytes double as the detail input.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
053b1a9d15 Audio: constant gentle ducking beats half-duplex unit swapping
The mid-stream VPIO<->plain unit swap glitched the start of the
assistant's own speech; keep the voice-processing unit armed for the
whole capture (standard+Min ducking) instead. set_echo_cancellation and
the options-rebuild plumbing stay for apps that want the trade.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
419d77c652 Audio: half-duplex echo control — duck only while the assistant speaks
Idle listening now runs PLAIN capture (no VPIO, zero ducking — music
untouched); the app arms the voice-processing unit only while its own
TTS is audibly playing (+0.8s tail), which is the only window where echo
cancellation matters. Options changes rebuild running input units
(AudioUnitAccess.last_input_options); WindowVoiceInput/VoiceWave gain
set_echo_cancellation; route app polls speech playback at 4Hz.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Kevin Boos
8e4573ee3b TextFlow: fix inline <code> spans that are too low (beneath text baseline) (#1156)
* TextFlow: fix inline `<code>` spans sagging below the baseline

finish_row_center centered every walk by its own height, so a code run's
shorter walk got a larger downward shift than the surrounding prose under
`RowAlign.Center`. That undid TextFlow's baseline_shift: inline `<code>`
spans sat a few px below the line's baseline, and their descenders poked
out of the bottom of the code box.

* FinishedWalk now carries an optional `align_height` that text runs set
  to their line style's height, so every text run on a row receives the
  same centering shift and stays on the baseline. Also fixes sub- and
  superscripts drifting under `RowAlign.Center`.
* The per-style metrics probe now caches descenders too, since we need
  the full line height (ascender + descender) to compute `align_height`.

* Html/Markdown: make the fixed/code font size scale configurable

Replaces the hardcoded 0.85 `FIXED_FONT_SIZE_SCALE` consts with a
`fixed_font_size_scale` live property on TextFlow (default 0.85), so
apps can tune how much smaller `<code>` text renders than the prose.
2026-08-01 08:25:00 +02:00
Admin
22316f9b8c Audio: echo-cancelled capture option (Apple VoiceProcessingIO)
use_audio_inputs_with_options(devices, AudioInputOptions{echo_cancellation})
— platform-neutral trait default ignores the flag; Apple swaps the input
unit HAL->VoiceProcessingIO (system-wide AEC, the unit iOS input already
uses), so the assistant's own TTS no longer feeds back into the mic.
Voice capture (WindowVoiceInput) requests it always.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:16:29 +02:00
Admin
723b7928bb Route assistant: mmap LLM weights, fix batched-attention corruption, kokoro voice out
- ggml: read-only mmap module (unix-gated) + two-region Context (mapped
  weights / dirty caches) + segmented Metal buffer binding; llama loads
  GGUF weights as file-backed clean pages (jetsam-exempt) with owned-arena
  fallback (MAKEPAD_LLAMA_NO_MMAP=1). Route app dirty footprint 12GB -> 4-7GB;
  model load becomes lazy page-in; A/B byte-identical on 4B + 9B.
- llama: fix graph-cache keying corruption — a graph keyed wider than the
  KV cache corrupted attention for any prefill batch >= 2 (flash op reads
  permute-node dims baked at build; view reconfigure never reached the
  kernel; masks were written cache-narrow). Masks now always fill the full
  graph key width and graphs key by 1024-buckets; reconfigure path removed.
  Verified byte-exact vs per-length reference across batch 1/2/8/64/512,
  short+long prompts, mmap on/off, plus a two-session concurrency probe.
- voice: passive VoiceWaves no longer register the global audio-input
  callback (the invisible caption-bar wave stole mic audio — last
  registrant wins — and spawned duplicate whisper workers); whisper back
  to F16 default (voice Metal library has no quantized kernels; q5_0
  failed every GPU matmul); raw transcripts render immediately.
- route: kokoro TTS voice output (speaker toggle; streams reply sentences,
  announces nav maneuvers + arrival) with barge-in — voice activity on the
  mic stops playback instantly; dispatcher context 8k -> 32k (hybrid KV is
  12/48 layers, ~48KB/token); window caption bar suppressed under studio.
- llama-generate: --max-context/--prefill-batch-size + state fingerprints;
  new llama_concurrent_probe bin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:13:31 +02:00
Admin
676255dfc2 Land route app + platform geo/permission APIs, map nav layer, geodata radar
apps/route: AI trip planner on MapView — tool broker + local/cloud agent
dispatch, nav session + simulated drive, layers/theme state, DDG image
search, trip history, tilt-shift DOF layer (linear circle-of-confusion:
level = log2 of radius, constant growth rate, tilt raises only the
ceiling; tilt-shift on by default).

Platform: Cx geo location API (macOS/iOS/Android/web) + permission
plumbing, memory watchdog, headless build cfg. Map: nav layer M0 API,
landcover drape, bridge dz. Geodata: 250m dual-radar compositor
(radar_volume) + KNMI sync. Docs for the route/glass/blur/shiny work.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 00:10:52 +02:00
Admin
0d8c4773d8 Glass blur: 1/8-res floor for deep mips, bicubic sampling, headless JIT fixes
Deep gauss pyramid levels (3-5) are re-homed to 1/8 resolution via
progressive half-texel tent upsamples so no on-screen sample comes from
a texture coarser than 8 device px/texel; half-texel offsets keep the
exposed sigma ladder at ratio-2 per level (full-texel tents inflate deep
levels ~35% and open a visible blur band at the raw->re-homed boundary).
Per-pixel sampling replaces the 13-tap cross cascade with 4-tap bicubic
B-spline reconstruction: C2-smooth (kills the bilinear texel lattice)
and cheaper (glass 26->8 taps, chromatic variant 78->24).

Headless shader JIT fixes found while verifying: RenderCx always emits
vtx_pos (vertex fns that return the position have no VertexPosition io),
vec*vec MulAssign/DivAssign impls, and discard returns a value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 00:10:52 +02:00