mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-26 23:28:43 +00:00
gpu.ts reads a batch's ops as native and web hosts do: an undefined list item is null, an undefined member absent (copying only what changes). widgets-gpu.md says so in Transport and Host checks, and defines a run restored from a snapshot as a device loss that keeps the greatest handle and the stopped canvases. Two new raw GPU fixtures.
17 lines
951 B
JSON
17 lines
951 B
JSON
{
|
|
"name": "raw-undefined-buffer-binding",
|
|
"source": "async function main() {\n widget.render(ui.canvas({ key: \"scene\", gpu: true, height: 100 }))\n __host.post({ type: \"gpu\", ops: [[\"bindGroupLayout\", 1, { entries: [{ binding: 0, visibility: 2, buffer: null, sampler: { type: \"filtering\" }, texture: null }] }], [\"sampler\", 2, { addressModeU: \"clamp-to-edge\", addressModeV: \"clamp-to-edge\", addressModeW: \"clamp-to-edge\", magFilter: \"nearest\", minFilter: \"nearest\", mipmapFilter: \"nearest\", lodMinClamp: 0, lodMaxClamp: 32, compare: null, maxAnisotropy: 1 }], [\"bindGroup\", 3, { layout: 1, entries: [{ binding: 0, resource: { buffer: undefined, sampler: 2 } }] }]], bytes: new ArrayBuffer(8) })\n await widget.frame()\n}",
|
|
"canvases": [
|
|
{
|
|
"key": "scene",
|
|
"width": 100,
|
|
"height": 100
|
|
}
|
|
],
|
|
"gpu": {
|
|
"available": true,
|
|
"format": "rgba8unorm"
|
|
},
|
|
"errors": [],
|
|
"end": "return"
|
|
}
|