Files
workinf_Blender_Wasm/docs/tasks/WBV2-P1424-001-desktop-completion/DW16.md
mes123456 f3e21c6b98
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-10 11:18:01 +08:00

59 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DW16:图像 compute、GPU 资源和同步恢复
- stage: `nodes-render`
- queueTask: `WBV2-P1424-001`;parent: `WBV2-P1424-000`;nextTask: `null`
- 包状态:`planned_gap_closure`(并不表示已有源码尚未实现)
- 完整交付依赖:DW03
- 工作量级:XL;不表示日期承诺
- validation: `NOT_RUN`;acceptance: `NOT_CLAIMED`
## 优先复用的十多天成果
compute/SSBO 专项 CS08–CS11;现有 texture/framebuffer 与 buffer broker 实现。
相关交接仅作按需引用:
- `tests/golden/WBV2-P1424-001/general-webgpu-compute-implementation.md`
- `tests/golden/WBV2-P1424-001/read-subpass-preview-implementation.md`
先对照当前小范围源码和最新交接保留已实现子项;只有缺功能、缺接线或缺必要依赖才新增实现。历史状态不自动当作当前缺口。
## 操作者工作流与交付
原生 shader sampler/image → GPU 计算 → owning Texture → 后续绘制/合成结果
真实图像 compute 与 buffer compute 共用后端、所有权和恢复机制;满足材质/渲染/合成消费者。
## 最小生产入口
- `blender-5.2.0/source/blender/gpu/webgl/webgl_texture.cc`
- `blender-5.2.0/source/blender/gpu/webgl/webgl_shader.cc`
- `blender-5.2.0/source/blender/gpu/webgl/webgl_backend.cc`
- `web/protocol/gpu-compute.ts`
- `web/app/src/workers/gpu-compute.worker.ts`
- `web/app/src/engine-client/gpu-compute-host.ts`
以上为聚焦入口,非要求全文加载。使用源码聚焦工具、精确 --source/--unit 和函数片段;接入新 operator 时追加其具体原生文件,单次最多 8 个精确源码文件。没有默认测试入口或要运行的 fixture;功能完成前不执行任何验证。
## 只补未完成部分
1. 领取 CS08 完成 typed texture/sampler/view、format/mip/layer、读写资格及 owner generation;保留现有 buffer ABI。
2. 补齐原生/WebGPU/WebGL 内容传递和 row alignment、图像屏障,跨 API 资源不能假定可零拷贝共享。
3. CS09 的真实 compositor 消费者在 DW19 落地,本包提供生产与消费接口;不同格式/3D/array/atomic 逐 caller 关闭缺口。
4. 复用 CS10 补齐取消/timeout/device/context loss、Main replacement 和晚结果拒绝,所有 native 目标事务提交。
5. 按 CS11 完成有界 device/pipeline/resource cache 与 dirty/version 上传回读策略;不在实现阶段跑性能基准。
compute 专项引用:`CS08`, `CS10`, `CS11`。卡位于 `docs/tasks/WBV2-P1424-001-compute-ssbo/`;一次只读当前一张,既有实现不重复,状态依据后续真实交接更新。CS09 在 DW19 负责消费者,CS12 在 DW26 负责原生 Python 入口,CS13/CS14 分别归 DW31/USER01;不要另起平行路线。
## 失败边界
不把原生图像算法放到 JS 执行;未支持格式、访问类型或设备能力始终保持明确业务缺口。
## 实现交接与后续使用
交付前必须具有实际入口→原生执行→消费者/结果→错误/取消→适用 history/save 的生产代码。这里是实现交付条件,不运行验收;编译成功不能替代功能。旧的已完成子项可引用并保留,不能声称本轮重新实现。
用户使用阶段的场景(现在不执行):在图像计算中修改输入、取消任务和恢复上下文,继续产生可被原生编辑器消费的结果。
每次记录保留成果、补齐断点、仍有缺口、必要构件与下一动作。共同规则见同目录 `EXECUTION.md`,首次领取时阅读;不要将完整计划作为后续执行上下文。