From 04606f058552f6ae4f594208abd6ec95eab02b21 Mon Sep 17 00:00:00 2001 From: Yona Appletree Date: Thu, 16 Jul 2026 10:41:19 -0700 Subject: [PATCH] docs(future): record the wgpu.f32 filetest texture-fixture deferment 34 texture directives stay @unsupported(wgpu.f32); GPU sampling semantics remain covered by the M5 texture_corpus gate. Notes what un-deferring takes and when. Co-Authored-By: Claude Opus 4.8 --- ...26-07-16-wgpu-filetest-texture-fixtures.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docs/future/2026-07-16-wgpu-filetest-texture-fixtures.md diff --git a/docs/future/2026-07-16-wgpu-filetest-texture-fixtures.md b/docs/future/2026-07-16-wgpu-filetest-texture-fixtures.md new file mode 100644 index 000000000..44b850f5f --- /dev/null +++ b/docs/future/2026-07-16-wgpu-filetest-texture-fixtures.md @@ -0,0 +1,46 @@ +# wgpu.f32 filetest texture fixtures (deferred) + +## Status: deliberately deferred (2026-07-16, M6 P3 review) + +## What is deferred + +34 directives across the `texture/` filetest corpus carry +`@unsupported(wgpu.f32)` with the rationale "texture fixtures are not +bound through the GPU registry yet". The `wgpu.f32` probe target +(lps-filetests `test_run/wgpu_probe.rs`) rejects any file with texture +specs instead of binding its inline pixel fixtures. + +## Why + +The filetest fixture-binding path is written against **guest memory**: +`alloc_shared()` places fixture pixels in the compiled shader's arena and +the sampler uniform carries a real guest pointer. The wgpu backend has no +guest memory — textures live in the backend registry +(`GpuGraphics::create_texture` → `texture_uniform_value()` → +`LpsValueF32::Texture2D`, resolved to a bind-group entry at render time). +Supporting fixtures needs a parallel binding path, not an adaptation. + +Deferral was judged low-cost: GPU sampling semantics (wrap modes, +`texelFetch` edge clamp, formats, filtering over `textureLoad`) are +already pinned by the M5 gate — `lp-gfx-wgpu/tests/texture_corpus.rs` — +so the filetest run would re-verify covered behavior through a second +harness rather than add coverage. Nothing on the lp-gfx or Studio +roadmaps consumes it. + +## What un-deferring takes (sm) + +1. Branch the harness fixture binding on the wgpu instance: create the + texture through the shared probe `GpuGraphics`, keep the + `TextureHandle` alive for the instance lifetime, take + `texture_uniform_value()`. +2. Teach `WgpuProbeInstance`'s uniform-tree builder to carry + `Texture2D` values and dotted paths for struct-nested samplers + (`params.gradient`) — today it builds a flat tree and rejects dotted + `set_uniform` paths. +3. Make `EXPECT_SETUP_FAILURE` files fail at bind time with matching + error text. +4. Remove the 34 annotations (greppable by the rationale string) and + rerun `--target wgpu.f32`. + +Natural moment: fold into the assembly prototype-order fix (which removes +~120 sibling annotations in the same motion).