Skip to content

Render samples on the CPU with colored terminal previews in CI - #100

Merged
natevm merged 14 commits into
masterfrom
feat/terminal-rendering
Oct 11, 2026
Merged

natevm merged 14 commits into
masterfrom
feat/terminal-rendering

Conversation

@natevm

@natevm natevm commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Actions now renders 16 GPRT samples on the CPU with Mesa 26.2.4 Lavapipe and shows one final-frame preview in each sample's log group. The job still renders two frames per sample and saves both previews and PNGs in the cpu-sample-images-and-logs artifact.

Colored previews use solid blocks with 24-bit RGB colors. This preserves the filtered framebuffer colors without the saturation boost or dark background showing through shade characters. The terminal regression test checks RGB channel order, intermediate colors, all 256 gray levels, and filtering in linear space.

Headless runs use a fixed frame limit and advance time by 1/60 second per buffer presentation. The preview preserves mapped host edits. GPRT_TERMINAL_COLOR=1 enables colored Unicode blocks when output is redirected, without clearing earlier log output. Sample edits update comments for this behavior.

The CPU run exposed an unsupported capture/replay requirement. GPRT now queries acceleration-structure addresses through Vulkan instead of requesting that they equal their backing buffer addresses. This correction is a separate commit with 8 insertions and 23 deletions.

Refits and rebuilds that reuse the allocation preserve acceleration-structure addresses. Compaction and allocation replacement require callers to refresh references, as before. A ray-tracing regression test retains cached BLAS and TLAS addresses while changing vertices and instance transforms, then checks hit distances after refits, same-size rebuilds, and refits of compacted trees.

The runner fails on crashes, 180-second timeouts, GPRT or Vulkan validation errors, unavailable validation, missing colored previews, missing PNGs, and uniform images. The solids sample starts its animation at one second so the first frames exercise distinct vertex values; its image check rejects the previous all-yellow output. These are rendering smoke tests; they do not compare against reference images.

Validation:

  • CPU Actions run: terminal and acceleration-address regression tests and 16 samples pass with synchronization validation enabled, including the solids color check. Expand Render samples on the CPU, then a sample group, to see its final-frame preview.
  • Windows Release on AMD Radeon AI PRO R9700: both regression tests and 16 samples pass with synchronization validation. The terminal test also passes when creating a window after a headless run.
  • All 2,080 terminal cells in the AMD instances preview exactly match an independent downsample of its saved PNG in linear color space.
  • The motion-blur triangle sample is excluded because Lavapipe lacks VK_NV_ray_tracing_motion_blur. The GUI and differentiable samples are excluded for existing GUI attachment synchronization errors; the differentiable sample also crashed on Lavapipe during the initial run. DLSS remains disabled.

To run locally after building samples and tests, install Pillow and run python tests/render_samples.py <build-directory>. Select the desired Vulkan driver through VK_DRIVER_FILES and make the validation layer available through VK_LAYER_PATH.

@natevm
natevm force-pushed the feat/terminal-rendering branch 2 times, most recently from 53b1e90 to d34aa0e Compare October 11, 2026 02:15
@natevm
natevm force-pushed the feat/terminal-rendering branch from d34aa0e to bf1e443 Compare October 11, 2026 02:16
@natevm natevm changed the title Add terminal previews and bounded deterministic headless runs Render samples on the CPU with colored terminal previews in CI Oct 11, 2026
@natevm
natevm marked this pull request as ready for review October 11, 2026 03:09
@natevm
natevm merged commit 2c6ee03 into master Oct 11, 2026
3 checks passed
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