Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logResult[n].extra fails to serialize in worker tests #4172

Open
ErichDonGubler opened this issue Feb 3, 2025 · 1 comment
Open

logResult[n].extra fails to serialize in worker tests #4172

ErichDonGubler opened this issue Feb 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@ErichDonGubler
Copy link
Member

Test: webgpu/cts/webgpu/web_platform/canvas/readbackFromWebGPUCanvas/dedicated.https.html?worker=dedicated&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:offscreenCanvas,snapshot:*

This happens because the postMessage call inside of the reportTestResults function in test_worker-worker.js in WebGPU CTS loads data from result, converting result.logs into a form more amenable form for a message via toRawData. However, for this test, the extra field of one or more logs entries is populated and preserved, containing function objects as members.

Standalone CTS doesn't reproduce this by default; one needs to set the debug query parameter first:
https://gpuweb.github.io/cts/standalone/?worker=dedicated&debug=1&q=webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_unconfigured_nonzero_size:*

I presume that the Chrome hasn't run into this because…it passes most of CTS. 😅

@ErichDonGubler ErichDonGubler added the bug Something isn't working label Feb 3, 2025
@ErichDonGubler
Copy link
Member Author

@kainino0x: If I were to file a PR for this, I think the simplest (naive) approach I might take is to serialize extra to JSON and back before sending it via postMessage. Do you think that might work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant