blob: d2b098d825282780557820b08baec325ccb5c84e [file]
<!-- webkit-test-runner [ enableMetalDebugDevice=true ] -->
<script src="../../../resources/js-test-pre.js"></script>
<script>
async function run() {
let adapter1 = await navigator.gpu.requestAdapter();
let device0 = await adapter1.requestDevice({ requiredFeatures: [ 'texture-compression-astc'] });
let texture1 = device0.createTexture({ size: [ 64, 64, 12 ], format: 'astc-4x4-unorm-srgb', usage: GPUTextureUsage.COPY_DST });
device0.queue.writeTexture({ texture: texture1 }, new Uint8Array(14_980), { bytesPerRow: 130 }, {width: 4, height: 12 });
await device0.queue.onSubmittedWorkDone();
device0.queue.writeTexture({ texture: texture1 }, new Uint8Array(202), {}, {width: 48, height: 4 });
await device0.queue.onSubmittedWorkDone();
debug('Pass')
globalThis.testRunner?.notifyDone();
}
globalThis.testRunner?.dumpAsText();
globalThis.testRunner?.waitUntilDone();
run();
</script>