60 lines
2.9 KiB
Markdown
60 lines
2.9 KiB
Markdown
# M10-08 Status
|
|
|
|
status: done
|
|
task: Shader compile key binding for graph, textures, color space and backend
|
|
updated: 2026-08-16 America/New_York
|
|
|
|
## Scope
|
|
|
|
Every bounded Shader compile report now carries a deterministic 64-character
|
|
`compileKey`. The key is SHA-256 over the task-local report schema, graph hash,
|
|
renderer backend, and sorted texture identities: image ID, usage, asset ID,
|
|
asset SHA-256, and resolved SRGB/LINEAR/NON_COLOR color space.
|
|
|
|
Texture identities are optional for legacy SceneIR rows; missing metadata is
|
|
represented explicitly as `null`, while usage-based color-space defaults remain
|
|
deterministic. An unknown renderer backend or malformed texture digest blocks
|
|
compilation. The global `web/protocol/schema-version` remains 1 because this is
|
|
an additive field in the task-local Shader report, whose schema is still 1.
|
|
|
|
## Runtime
|
|
|
|
- `ImageIR.colorSpace` is optional and validated; render asset requests use it
|
|
when present and otherwise retain the existing usage-derived color space.
|
|
- The Engine Worker passes snapshot image asset/hash/color-space identity into the
|
|
compiler. The PBR adapter accepts the same context for main-thread and Offscreen
|
|
material creation.
|
|
|
|
## Evidence
|
|
|
|
- `WEB_TEST_PORT=5523 npm --prefix web run test:shader-compile-key`: unit 7/7 and
|
|
Chromium 1/1 passed. The browser test proves key changes for texture SHA-256 and
|
|
color-space changes through the application PBR entry point.
|
|
- `WEB_TEST_PORT=5524 npm --prefix web run test:shader-compile`: M10-07 regression
|
|
unit 7/7 and Chromium 3/3 passed.
|
|
- `npm --prefix web run typecheck`, `npm --prefix web run lint`,
|
|
`npm --prefix web run build`, `npm --prefix web run test:status-consistency`,
|
|
and `git diff --check` passed.
|
|
|
|
The first browser attempt on port 5522 used a repository-root dynamic import that
|
|
Vite does not expose and was rejected before exercising the compiler. The test was
|
|
moved through the application PBR entry point and rerun in full on port 5523.
|
|
|
|
## Implementation Hashes
|
|
|
|
- Compiler: `acd5f8deb2912f6823533df12baba8049c5e64d440c17a6dc3f90741f71774b2`.
|
|
- SceneIR: `a65ef3b4be5303b1b86b3ee6829c795870dcc2490ba58d3a66b8bed8172d6442`.
|
|
- Render assets: `840c09a6c2ec56cc75a9ca72bcbdde6957612a7c61b19ab83be47c571eca8b67`.
|
|
- Engine Worker: `668728f7e5b6edf9e1cee3e6152238d16ac19f43f030e94e77bfe24e7ff50489`.
|
|
- PBR adapter: `8a9cb52c8e7b1481096017cc659d93541c21724c1203d22755e37e1e3c365250`.
|
|
- Unit test: `9ae9bb4c778d9e31a607d0c7d678ecf3448ed4e5b57c88ab4ba767a2f0850cc7`.
|
|
- Chromium spec: `a09ebfa451e76c33f421bc8402fac4c77faedee88020431a505602f317b4eb65`.
|
|
- Golden: `187666d9dfb9d9cdd5bd6195cc2f7ee57bb78fa0d05d6020762c06a4ab015984`.
|
|
|
|
## Rollback
|
|
|
|
Remove `compileKey`, texture identity context, ImageIR color-space metadata,
|
|
M10-08 tests/golden and the Worker/adapter wiring together. Restore the M10
|
|
count to 7/15 and retain graphHash-only reports with the original usage-derived
|
|
render asset color-space behavior.
|