Skip to content

Add a stats subcommand: scene characterisation with no GPU device - #74

Open
onebender137 wants to merge 1 commit into
meshy-dev:mainfrom
onebender137:feat/stats-subcommand
Open

onebender137 wants to merge 1 commit into
meshy-dev:mainfrom
onebender137:feat/stats-subcommand

Conversation

@onebender137

Copy link
Copy Markdown

Adds threert-render stats <bundle>: builds the world in the embedded runtime, runs the CPU-side scene build, and reports objects, geometries, materials, textures, triangles, instances and emitters — with no adapter, no device and no upload.

This came out of needing per-scene emitter counts for the analysis in #72, on a card that couldn't hold the heavier scenes. Being able to characterise a scene without a GPU turned out useful on its own, so offering it back.

21 lines in main.rs.

Builds the world in the embedded QuickJS runtime, then runs the CPU
scene build + prepare_as (the same path the render and live modes use,
with the hardware-traversal flags) and reports what a frame will cost
structurally: objects, geometries, materials, textures, triangles
(flat + instanced, same counts the render stats report), instances,
and emitter triangles.

No adapter, no device, no upload: a scene's geometry and light-source
counts are properties of the world, not of the GPU. Useful for
triaging which scenes will fit on a card before allocating it, and
for benchmarking workloads without a render pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant