Skip to content

Add wipeout-tris bench routine - #1

Merged
codewiz merged 1 commit into
mainfrom
bench/wipeout-tris
Oct 2, 2026
Merged

codewiz merged 1 commit into
mainfrom
bench/wipeout-tris

Conversation

@codewiz

@codewiz codewiz commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Adds wipeout-tris: render_push_tris() from @arczi84's Wipeout port, as packaged for AmigaPorts/m68k-amigaos-gcc#89. The kernel and its headers are vendored verbatim under third_party/wipeout/; benches/wipeout.c provides the flush callback, runs the three texture-switch patterns (every 1024, 8 and 1 triangles) and checks one extra pass per pattern against a scalar reference.

Under volamos (68040, 25 MHz, cycle counted), rc13 soft float takes 1164 ms vs 1112 ms for gcc 6.5, with identical check values across compilers and with -mhard-float.

@arczi84: the Wipeout rewrite publishes no license, so before merging I would like to add a LICENSE file under third_party/wipeout/. Which terms should it carry for the extracted function and headers?

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7098cfd3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread third_party/wipeout/README.md Outdated
Comment on lines +13 to +14
The Wipeout rewrite publishes no license; its README asks that the code not
be used in a commercial release.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Obtain redistribution permission before vendoring Wipeout

This commit adds kernel.c and several Wipeout headers to the distributed source tree, while the new vendoring README states that upstream publishes no license. A request not to use the code commercially is not a license to copy, modify, or redistribute it, so merging this leaves BenchWork distributing code without established permission; obtain and include the upstream terms or remove the vendored sources.

Useful? React with 👍 / 👎.

Comment on lines +6 to +8
static tris_t tris_buffer[RENDER_TRIS_BUFFER_CAPACITY] __attribute__((aligned(8)));
static uint32_t tris_len;
static render_texture_t textures[TEXTURES_MAX];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Place the staging buffer under --fastmem control

When --fastmem is selected, only allocations routed through bench_alloc() are required to be MEMF_FAST; this staging buffer (and the adjacent texture table) instead live in the executable's BSS. On systems where that BSS is placed in chip or otherwise non-fast memory, every triangle assignment still writes this uncontrolled buffer, so the new benchmark can report memory-placement effects despite the option intended to prevent incomparable timings. Allocate this working storage through the harness or otherwise require fast memory for it.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The 1024-triangle pattern never switches textures, and the vendored source lacks redistribution terms.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds a Wipeout triangle-submission benchmark to measure UV scaling, color clamping, buffering, and structure-copy performance.

Changes:

  • Vendors the extracted Wipeout rendering kernel and required headers.
  • Adds benchmark inputs, validation, texture-switch patterns, and registration.
  • Updates build configuration and benchmark documentation.
File Description
Makefile Builds the new benchmark and kernel.
README.md Documents wipeout-tris.
benches/​wipeout.c Implements benchmark setup, execution, and validation.
src/​bench.h Declares the benchmark.
src/​main.c Registers the benchmark.
third_party/​wipeout/​README.md Documents provenance and licensing status.
third_party/​wipeout/​bench.h Defines the kernel/harness interface.
third_party/​wipeout/​kernel.c Provides the extracted rendering workload.
third_party/​wipeout/​render_gl_legacy_types.h Defines triangle and vertex types.
third_party/​wipeout/​source.sha256 Records the source-body hash.
third_party/​wipeout/​types.h Provides supporting types and math helpers.
third_party/​wipeout/​utils.h Provides supporting utility macros and functions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread third_party/wipeout/README.md Outdated
Comment on lines +13 to +14
The Wipeout rewrite publishes no license; its README asks that the code not
be used in a commercial release.
Comment thread benches/wipeout.c
(i * 3 + j) % 256, i % 7 ? 255 : 0 };
}
for (unsigned m = 0; m < 3; m++)
tex[m * N + i] = (i / RUNS[m]) % 8;
@codewiz codewiz changed the title Add wipeout-tris, Wipeout's triangle submission path Add wipeout-tris bench routine Oct 2, 2026
@codewiz
codewiz force-pushed the bench/wipeout-tris branch 3 times, most recently from ffedec4 to 5e2e6dc Compare October 2, 2026 11:19
render_push_tris() from arczi84's Wipeout port, as he packaged it for
m68k-amigaos-gcc#89: float UV scaling, byte clamps and a 96-byte struct
copy per triangle, under three texture-switch patterns.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codewiz
codewiz force-pushed the bench/wipeout-tris branch from 5e2e6dc to e5a3df0 Compare October 2, 2026 12:54
@codewiz
codewiz merged commit 7159e58 into main Oct 2, 2026
2 checks passed
@codewiz
codewiz deleted the bench/wipeout-tris branch October 2, 2026 15:19
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.

2 participants