Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RenaudRohlinger committed Jan 20, 2025
1 parent 332b16a commit 2efb229
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class WebGPUTimestampQueryPool extends TimestampQueryPool {

}

let mappingOperation = null;
try {

if ( this.resultBuffer.mapState !== 'unmapped' ) {
Expand Down Expand Up @@ -150,16 +149,14 @@ class WebGPUTimestampQueryPool extends TimestampQueryPool {
const commandBuffer = commandEncoder.finish();
this.device.queue.submit( [ commandBuffer ] );

if ( this.resultBuffer.mapState !== 'unmapped' || this.isDisposed ) {
if ( this.resultBuffer.mapState !== 'unmapped' ) {

return this.lastValue;

}

// Create and track the mapping operation
mappingOperation = this.resultBuffer.mapAsync( GPUMapMode.READ, 0, bytesUsed );

await mappingOperation;
await this.resultBuffer.mapAsync( GPUMapMode.READ, 0, bytesUsed );

if ( this.isDisposed ) {

Expand Down

0 comments on commit 2efb229

Please sign in to comment.