summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/tests/cts/checkout/src/webgpu/util/binary_stream.ts
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/webgpu/util/binary_stream.ts')
-rw-r--r--dom/webgpu/tests/cts/checkout/src/webgpu/util/binary_stream.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/util/binary_stream.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/util/binary_stream.ts
index a6512020e6..2531521dc4 100644
--- a/dom/webgpu/tests/cts/checkout/src/webgpu/util/binary_stream.ts
+++ b/dom/webgpu/tests/cts/checkout/src/webgpu/util/binary_stream.ts
@@ -85,6 +85,16 @@ export default class BinaryStream {
return this.view.getInt16(this.alignedOffset(2), /* littleEndian */ true);
}
+ /** writeI64() writes a bitint to the buffer at the next 64-bit aligned offset */
+ writeI64(value: bigint) {
+ this.view.setBigInt64(this.alignedOffset(8), value, /* littleEndian */ true);
+ }
+
+ /** readI64() reads a bigint from the buffer at the next 64-bit aligned offset */
+ readI64(): bigint {
+ return this.view.getBigInt64(this.alignedOffset(8), /* littleEndian */ true);
+ }
+
/** writeI32() writes a int32 to the buffer at the next 32-bit aligned offset */
writeI32(value: number) {
this.view.setInt32(this.alignedOffset(4), value, /* littleEndian */ true);