From 2ef3f322027bec1bb5572f5083d478148d355d79 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 27 Oct 2023 16:40:00 +0100 Subject: [PATCH] BinaryStream: Use little endian for f64 To match all the other data types --- src/webgpu/util/binary_stream.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webgpu/util/binary_stream.ts b/src/webgpu/util/binary_stream.ts index 4941b9a4dab9..2b32db9b3e06 100644 --- a/src/webgpu/util/binary_stream.ts +++ b/src/webgpu/util/binary_stream.ts @@ -117,12 +117,12 @@ export default class BinaryStream { /** writeF64() writes a float64 to the buffer at the next 64-bit aligned offset */ writeF64(value: number) { - this.view.setFloat64(this.alignedOffset(8), value); + this.view.setFloat64(this.alignedOffset(8), value, /* littleEndian */ true); } /** readF64() reads a float64 from the buffer at the next 64-bit aligned offset */ readF64(): number { - return this.view.getFloat64(this.alignedOffset(8)); + return this.view.getFloat64(this.alignedOffset(8), /* littleEndian */ true); } /**