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

KTXDecoder: Fix crash with "buffer already detached" #13500

Merged
merged 3 commits into from Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/dev/core/src/Misc/khronosTextureContainer2.ts
Expand Up @@ -409,9 +409,7 @@ export class KhronosTextureContainer2 {
dataCopy.set(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));

if (KhronosTextureContainer2.DefaultDecoderOptions.isDirty) {
worker.postMessage({ action: "setDefaultDecoderOptions", options: KhronosTextureContainer2.DefaultDecoderOptions._getKTX2DecoderOptions() }, [
dataCopy.buffer,
]);
worker.postMessage({ action: "setDefaultDecoderOptions", options: KhronosTextureContainer2.DefaultDecoderOptions._getKTX2DecoderOptions() });
}

worker.postMessage({ action: "decode", data: dataCopy, caps: compressedTexturesCaps, options }, [dataCopy.buffer]);
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/tools/tests/test/visualization/config.json
Expand Up @@ -1555,6 +1555,11 @@
{
"title": "Asset Container Instantiate to Scene 2",
"playgroundId": "#5NFRVE#161"
},
{
"title": "Loading glTF model with KTX2 textures",
"playgroundId": "#YD2TXP#35",
"excludeFromAutomaticTesting": true
}
]
}