Emscripten/WebAssembly supports three memory models: 1. <= 2GB memory, 2. > 2GB memory (32-bit, up to 4GB) 3. Wasm64 (64-bit, up to 16GB) Currently in Firefox if one calls `queue.writeBuffer()` with an ArrayBufferView that flows from a WebAssembly program that is utilizing either of memory models 2. or 3. above, Firefox will fail with an exception ``` TypeError: GPUQueue.writeBuffer: ArrayBufferView branch of (ArrayBuffer or ArrayBufferView) can't be an ArrayBuffer or an ArrayBufferView larger than 2 GB ``` The WebGPU functions ``` queue.writeTexture() encoder.setImmediateData() ``` probably also have the same issue, since they too take in an ArrayBufferView.
Bug 2022805 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Emscripten/WebAssembly supports three memory models: 1. <= 2GB memory, 2. > 2GB memory (32-bit, up to 4GB) 3. Wasm64 (64-bit, up to 16GB) Currently in Firefox if one calls `queue.writeBuffer()` with an ArrayBufferView that flows from a WebAssembly program that is utilizing either of memory models 2. or 3. above, Firefox will fail with an exception ``` TypeError: GPUQueue.writeBuffer: ArrayBufferView branch of (ArrayBuffer or ArrayBufferView) can't be an ArrayBuffer or an ArrayBufferView larger than 2 GB ``` The WebGPU functions ``` queue.writeTexture() encoder.setImmediateData() ``` also have the same issue, since they too take in an ArrayBufferView.
Emscripten/WebAssembly supports three memory models: 1. <= 2GB memory, 2. > 2GB memory (32-bit, up to 4GB) 3. Wasm64 (64-bit, up to 16GB) Currently in Firefox if one calls `queue.writeBuffer()` with an ArrayBufferView that flows from a WebAssembly program that is utilizing either of memory models 2. or 3. above, Firefox will fail with an exception ``` TypeError: GPUQueue.writeBuffer: ArrayBufferView branch of (ArrayBuffer or ArrayBufferView) can't be an ArrayBuffer or an ArrayBufferView larger than 2 GB ``` The WebGPU functions ``` queue.writeTexture() encoder.setImmediateData() encoder.setBindGroup() ``` also have the same issue, since they too take in an ArrayBufferView.
Emscripten/WebAssembly supports three memory models: 1. <= 2GB memory, 2. \> 2GB memory (32-bit, up to 4GB) 3. Wasm64 (64-bit, up to 16GB) Currently in Firefox if one calls `queue.writeBuffer()` with an ArrayBufferView that flows from a WebAssembly program that is utilizing either of memory models 2. or 3. above, Firefox will fail with an exception ``` TypeError: GPUQueue.writeBuffer: ArrayBufferView branch of (ArrayBuffer or ArrayBufferView) can't be an ArrayBuffer or an ArrayBufferView larger than 2 GB ``` The WebGPU functions ``` queue.writeTexture() encoder.setImmediateData() encoder.setBindGroup() ``` also have the same issue, since they too take in an ArrayBufferView.