(ptr: GPUPointer)
| 922 | } |
| 923 | |
| 924 | private deviceFreeDataSpace(ptr: GPUPointer): void { |
| 925 | const idx = ptr; |
| 926 | const buffer = this.bufferTable[idx]; |
| 927 | this.bufferTable[idx] = undefined; |
| 928 | assert(buffer !== undefined); |
| 929 | this.bufferTableFreeId.push(idx); |
| 930 | this.currAllocatedBytes -= buffer.size; |
| 931 | // Flush any pending compute passes that may reference this buffer |
| 932 | // before destroying it, otherwise queue.submit() will fail with |
| 933 | // "buffer used in submit while destroyed". |
| 934 | this.flushCommands(); |
| 935 | buffer.destroy(); |
| 936 | } |
| 937 | |
| 938 | private deviceCopyToGPU( |
| 939 | from: Pointer, |
no test coverage detected