Files
workinf_Blender_Wasm/docs/tasks/WBV2-P1424-001-compute-ssbo/CS12.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

53 lines
3.1 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.
# CS12:原生 Python 标准入口与业务路由一致
- queueTask: WBV2-P1424-001
- parentTask: WBV2-P1424-000
- packageStatus: planned
- dependsOn: CS02, CS04, CS10
- validation: NOT_RUN;acceptance: NOT_CLAIMED
## 业务与交付
主应用 Text/Console → 原生 gpu shader/create-info/compute → 同一 native backend;保留已有扩展入口
原生脚本与内部 draw/compositor 共用 compute 后端,用户入口和能力报告一致。
## 最小输入与源码依据
- `blender-5.2.0/source/blender/python/gpu/gpu_py_compute.cc`
- `blender-5.2.0/source/blender/python/gpu/gpu_py_compute_web.cc`
- `blender-5.2.0/source/blender/python/gpu/gpu_py_compute.hh`
- `blender-5.2.0/scripts/templates_py/gpu_compute_storage_web.py`
- `web/app/src/engine-client/gpu-compute-host.ts`
- `web/app/src/workers/web-engine.worker.ts`
- 已有 dispatch_glsl/dispatch_wgsl 原生扩展;这两条入口不等于标准 GPUShaderCreateInfo 路由。
## 实现步骤
1. 领取时聚焦读取 gpu_py shader/create-info 的注册与参数入口,将实际已有标准 API 接入统一 shader/resource 实现;不虚构桌面 Python 不存在的 SSBO 类。
2. 标准 dispatch 的类型/上下文/编译错误遵循原生模块语义,扩展 dispatch_glsl/wgsl 继续复用同一 broker 和资源限制。
3. 更新原生 Text 模板,区分通用脚本 buffer 示例和原生业务自动路由;公开精确支持边界而非 nativeUI 完成旗标。
4. 确保 Text/Console 取消、脚本异常、保存/重开不持久化 GPU handles;只持久化原生业务数据。
## 失败边界
不得把纯 JS 包装或新的演示接口算成标准原生入口完成。
发生阻塞时记录具体业务、原生函数/create-info、producer/consumer 和下一修复动作;保留既有产物,继续无此依赖的实现卡,不用缺失证据作为实现阻塞。
## 延后的用户场景(当前不执行)
- 标准 shader/create-info→dispatch
- 已有 GLSL/WGSL 扩展兼容
- 错误类型/无 context/取消
- 重开后不复用旧 GPU handle
没有在本次拆解中创建或运行测试 fixture。原生 shader、现有模板和真实业务数据是实现输入;需要新增用户使用 fixture 时在全项目实现完成后安排。
## 交接
每次报告填写:实际 workflow/route、源码函数与修改、仍未实现接口、产物元数据(仅生成时)、失败/no-mutation 策略、implementation 状态、validation=NOT_RUN、acceptance=NOT_CLAIMED、下一实现动作。记录 unitCount/verifiedUnits/unverifiedUnits/sourceTreeSha256 的来源;未绑定/未验证不增记覆盖。
执行约束:本卡属于 WBV2-P1424-001 / parent WBV2-P1424-000,nextTask=null 保持不变。全部功能实现前不执行测试、回归、冒烟、浏览器验收、类型/语法/上下文检查或证据审计。仅为产物生成进行必要增量编译。源码检索使用 tools/web/search-wbv2-batch-source.mjs 的精确 --source/--unit;GLSL fixture 只读取本卡列出的原文件。不加载完整专项规划、历史日志或源码 inventory。JS 仅承担浏览器 API/传输;几何算法仍使用 OCCT 出口,Three.js 仅显示。