Просмотр исходного кода

Fix wasm memory view not sized correctly

Popov72 5 лет назад
Родитель
Сommit
ce824b6a8a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/Misc/KTX2/wasmMemoryManager.ts

+ 1 - 1
src/Misc/KTX2/wasmMemoryManager.ts

@@ -32,7 +32,7 @@ export class WASMMemoryManager {
             this._memoryView = new Uint8Array(this._memory.buffer, offset, byteLength);
             this._memoryViewByteLength = byteLength;
             this._memoryViewOffset = offset;
-        } else if (this._memoryViewByteLength < byteLength || this._memoryViewOffset !== offset) {
+        } else {
             console.log("recreate view", this._memoryViewByteLength, byteLength, this._memoryViewOffset, offset);
             this._memoryView = new Uint8Array(this._memory.buffer, offset, byteLength);
             this._memoryViewByteLength = byteLength;