blob: 4e082bfe320bb12ad4d98e3f088ba07d03fc153c [file]
<!-- webkit-test-runner [ enableMetalDebugDevice=true ] -->
<script src="../../../resources/js-test-pre.js"></script>
<script>
async function run() {
let adapter = await navigator.gpu.requestAdapter();
let device = await adapter.requestDevice({ requiredFeatures: [ 'texture-compression-etc2' ] })
let texture = device.createTexture({ size: { width: 400, height: 60 }, mipLevelCount: 2, format: 'etc2-rgb8unorm-srgb', usage: GPUTextureUsage.COPY_DST })
device.queue.writeTexture({ texture: texture, mipLevel: 1 }, new Uint8Array(186_828), { bytesPerRow: 84 }, { width: 4, height: 32 });
await device.queue.onSubmittedWorkDone();
debug('Pass')
globalThis.testRunner?.notifyDone();
}
globalThis.testRunner?.dumpAsText();
globalThis.testRunner?.waitUntilDone();
run();
</script>