[GH-ISSUE #7206] real_packs test: preprocess with the game's macros (renderer and feature macros) #3175

Closed
opened 2026-11-03 04:06:26 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @arslanarm on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7206

Originally assigned to: @arslanarm on GitHub.

🤖 Filed by arslanarm's AI agent (Claude Code, Claude Opus 5.5), not by arslanarm personally.

What happens: crates/horizon-shaders/tests/real_packs.rs (the --ignored test that reads every pack in HORIZON_TEST_SHADER_PACKS) doesn't preprocess with the macros the game uses, so its counts can differ from what the game translates.

  • Its "stage files preprocessed" pass and its "composite-style programs" pass both use Macros::standard() alone. They don't call define_features (no IRIS_FEATURE_<name> for a pack's iris.features.optional), or define_renderer (no MC_GL_VENDOR_OTHER, MC_GL_RENDERER_OTHER, MC_MIPMAP_LEVEL).
  • Its per-dimension load_post pass calls define_features but not define_renderer.
  • The game (game/shader_packs.rs) uses Macros::standard(), then renderer.define_pack_macros (define_renderer), then define_features, before it reads the programs.

A pack that picks its code with #ifdef IRIS_FEATURE_CUSTOM_IMAGES, MC_GL_VENDOR_* or MC_MIPMAP_LEVEL therefore goes down a path in real_packs that it never takes in the game. Our measurements of translation fixes (skipped programs, before vs after, over Modrinth's 40 most-downloaded packs) rely on this test.

Expected: all three passes build their macros the way the game does: the standard set, the renderer's, then the pack's features. Ideally this goes through one shared helper, so the two can't drift apart again. Then the before/after counts it prints reflect what the game translates.

Tooling only; players see no change.

Originally created by @arslanarm on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7206 Originally assigned to: @arslanarm on GitHub. > 🤖 Filed by arslanarm's AI agent (Claude Code, Claude Opus 5.5), not by arslanarm personally. **What happens:** `crates/horizon-shaders/tests/real_packs.rs` (the `--ignored` test that reads every pack in `HORIZON_TEST_SHADER_PACKS`) doesn't preprocess with the macros the game uses, so its counts can differ from what the game translates. - Its "stage files preprocessed" pass and its "composite-style programs" pass both use `Macros::standard()` alone. They don't call `define_features` (no `IRIS_FEATURE_<name>` for a pack's `iris.features.optional`), or `define_renderer` (no `MC_GL_VENDOR_OTHER`, `MC_GL_RENDERER_OTHER`, `MC_MIPMAP_LEVEL`). - Its per-dimension `load_post` pass calls `define_features` but not `define_renderer`. - The game (`game/shader_packs.rs`) uses `Macros::standard()`, then `renderer.define_pack_macros` (`define_renderer`), then `define_features`, before it reads the programs. A pack that picks its code with `#ifdef IRIS_FEATURE_CUSTOM_IMAGES`, `MC_GL_VENDOR_*` or `MC_MIPMAP_LEVEL` therefore goes down a path in `real_packs` that it never takes in the game. Our measurements of translation fixes (skipped programs, before vs after, over Modrinth's 40 most-downloaded packs) rely on this test. **Expected:** all three passes build their macros the way the game does: the standard set, the renderer's, then the pack's features. Ideally this goes through one shared helper, so the two can't drift apart again. Then the before/after counts it prints reflect what the game translates. Tooling only; players see no change.
Author
Owner

@arslanarm commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6577554271 --> @arslanarm commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3175
No description provided.