Skip to content

Commit 56c1237

Browse files
committed
docs(plan): §7 §11 §12 —— 最后三节没标注的地方,以及 .incbin 报告差异是一条跨平台约束
1 parent e699b27 commit 56c1237

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.agents/docs/2026-09-07-module-first-heterogeneous-surface.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,9 @@ module is a 2 KB BMI, and the link collects both.
569569
570570
## 7. What remains open, and where each lands
571571

572+
**As of the base commits.** Three of the four have since been resolved and each
573+
says so below; section 14 is the register of what is open today.
574+
572575
1. **No dependency tracking for included device sources.** `mcpp::action` has no
573576
depfile field, so `rules/spirv.cppm` declares only the `.comp` and
574577
`rules/cuda.cppm` only the `.cu`. Editing a `.glsl` or a `.cuh` rebuilds
@@ -577,6 +580,12 @@ module is a 2 KB BMI, and the link collects both.
577580
rather than a failure, and the `.incbin` dependency in 4.3 needs the same
578581
field.
579582

583+
**Resolved, and the last sentence was wrong.** `mcpp::action::depfile`
584+
shipped in mcpp 2026.9.7.1 and all six rules pass one from `mcpp:plugins`
585+
0.3.1, each spelling measured against the tool rather than read from its
586+
help text. The `.incbin` dependency does NOT need the same field -- no
587+
assembler channel reaches it portably -- which is 14.1.
588+
580589
2. **`glslc` cannot be selected by declaration.** `find_compiler` consults
581590
`xpkg_dir("glslang")` before `xpkg_dir("shaderc")`, and the rule declares
582591
glslang unconditionally, so glslang wins in every build that works. The
@@ -588,6 +597,11 @@ module is a 2 KB BMI, and the link collects both.
588597
3. **The stem refusal becomes narrower once 5.3 lands.** It should stay for a
589598
genuine within-directory collision and stop firing for two directories.
590599

600+
**Resolved in `mcpp:plugins` 0.3.0.** `tests/spirv-module-consumer` carries
601+
`shaders/a/scale.comp` and `shaders/b/scale.comp` and builds, which is the
602+
fixture that says so; the refusal remains for a collision within one
603+
directory.
604+
591605
4. **Slang.** `slangc` should become `mcpp.rules.slang` rather than a third
592606
flavour of `rules.spirv`: glslang and glslc are two drivers for one language
593607
compiling the same `.comp`, whereas Slang is a different language with a
@@ -598,6 +612,11 @@ module is a 2 KB BMI, and the link collects both.
598612
invent a scope API for this because xmake offered no package-level dependency
599613
to reuse; mcpp has one, and should use it rather than copy the workaround.
600614

615+
**Resolved in `mcpp:plugins` 0.3.0.** `mcpp.rules.slang` exists and declares
616+
its own `device_extensions`, so `.slang` was REMOVED from the engine's
617+
built-in table and `tests/slang-consumer` still builds -- which is the
618+
measurement that a new device language costs no engine release (13.1.2).
619+
601620
## 8. Staging
602621

603622
Each stage is useful alone and none depends on a later one.
@@ -739,11 +758,29 @@ Sidecar storage has no assembler requirement and is available everywhere, but it
739758
changes what `mcpp pack` must collect, which is why it is the only storage that
740759
touches the engine.
741760

761+
**A second cross-platform constraint on the same storage, found later.** The
762+
two GAS-capable assemblers do not agree on whether they REPORT what `.incbin`
763+
reads. GNU as names the embedded file in its own `--MD` output; clang's
764+
integrated assembler has no dependency output of any kind. So the obvious way
765+
to keep an embedded payload current -- ask the assembler -- would work on one
766+
toolchain and fail silently on the other, which is worse than failing on both:
767+
the toolchain that reports nothing is the one whose users could never reproduce
768+
the staleness. This is why the dependency is DECLARED by the generator
769+
(`mcpp::recompile_if_changed`, 14.1) rather than discovered from the tool, and
770+
it is a cross-platform argument rather than an aesthetic one.
771+
742772
## 12. Slang, in full
743773

744774
Section 7 argued that `slangc` belongs in a rule of its own. This section states
745775
what that rule is.
746776

777+
> **Shipped as described, in `mcpp:plugins` 0.3.0.** Everything below holds of
778+
> `mcpp.rules.slang` as it exists, with one addition: from 0.3.1 the rule passes
779+
> `slangc -depfile`, so a `.slang` that includes another rebuilds when it
780+
> changes (14.2). The version pin discussed at the end of this section is 14.6:
781+
> resolved by fact rather than by work, because the index's ceiling and the
782+
> package's floor are the same release.
783+
747784
**Extensions claimed.** `.slang`. Not the GLSL stage extensions: a `.slang` file
748785
names its entry points internally and `-fshader-stage` has no analogue.
749786

0 commit comments

Comments
 (0)