opencode/packages/widget/test/fixtures/gpu/raw-undefined-buffer-binding.json
OpenCode Agent f8119b8bcc feat(core): GPU ops read as JSON reads them; restored runs are a device loss
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.
2026-11-23 03:03:22 +00:00

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"
}