mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-26 23:28:43 +00:00
raw-bytes-not-an-array-buffer posts valid ops into scene with a Uint8Array for bytes (stops ["scene"]); raw-ops-not-a-list posts a string for ops (stops all). Raw fixtures of the wrong shape keep their batches, with bytes null when they aren't an ArrayBuffer and ops as posted.
41 lines
1.4 KiB
JSON
41 lines
1.4 KiB
JSON
{
|
|
"name": "raw-bytes-not-an-array-buffer",
|
|
"source": "async function main() {\n widget.render(ui.canvas({ key: \"scene\", gpu: true, height: 100 }))\n __host.post({ type: \"gpu\", ops: [[\"context\", 1, \"scene\", \"rgba8unorm\", \"opaque\"], [\"view\", 2, 1, { dimension: \"2d\", baseMipLevel: 0, mipLevelCount: 1, baseArrayLayer: 0, arrayLayerCount: 1 }], [\"pass\", { colorAttachments: [{ view: 2, resolveTarget: null, clearValue: [0, 0, 0, 1], loadOp: \"clear\", storeOp: \"store\" }], depthStencilAttachment: null }], [\"end\"]], bytes: new Uint8Array(8) })\n await widget.frame()\n}",
|
|
"canvases": [
|
|
{
|
|
"key": "scene",
|
|
"width": 100,
|
|
"height": 100
|
|
}
|
|
],
|
|
"gpu": {
|
|
"available": true,
|
|
"format": "rgba8unorm"
|
|
},
|
|
"errors": [
|
|
{
|
|
"message": "a batch's bytes must be an ArrayBuffer",
|
|
"canvases": [
|
|
"scene"
|
|
]
|
|
}
|
|
],
|
|
"end": "return",
|
|
"batches": [
|
|
{
|
|
"frame": false,
|
|
"bytes": null,
|
|
"ops": [
|
|
["context",1,"scene","rgba8unorm","opaque"],
|
|
["view",2,1,{"dimension":"2d","baseMipLevel":0,"mipLevelCount":1,"baseArrayLayer":0,"arrayLayerCount":1}],
|
|
["pass",{"colorAttachments":[{"view":2,"resolveTarget":null,"clearValue":[0,0,0,1],"loadOp":"clear","storeOp":"store"}],"depthStencilAttachment":null}],
|
|
["end"]
|
|
]
|
|
},
|
|
{
|
|
"frame": true,
|
|
"bytes": "",
|
|
"ops": []
|
|
}
|
|
]
|
|
}
|