Skip to content

Commit

Permalink
1 word (#30289)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw authored Jan 8, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 8f31ce2 commit 3af0d63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/renderers/webgpu/WebGPUBackend.js
Original file line number Diff line number Diff line change
@@ -1468,21 +1468,21 @@ class WebGPUBackend extends Backend {

const renderContextData = this.get( renderContext );

if ( ! renderContextData.timeStampQuerySet ) {
if ( ! renderContextData.timestampQuerySet ) {


const type = renderContext.isComputeNode ? 'compute' : 'render';
const timeStampQuerySet = this.device.createQuerySet( { type: 'timestamp', count: 2, label: `timestamp_${type}_${renderContext.id}` } );
const timestampQuerySet = this.device.createQuerySet( { type: 'timestamp', count: 2, label: `timestamp_${type}_${renderContext.id}` } );

const timestampWrites = {
querySet: timeStampQuerySet,
querySet: timestampQuerySet,
beginningOfPassWriteIndex: 0, // Write timestamp in index 0 when pass begins.
endOfPassWriteIndex: 1, // Write timestamp in index 1 when pass ends.
};

Object.assign( descriptor, { timestampWrites } );

renderContextData.timeStampQuerySet = timeStampQuerySet;
renderContextData.timestampQuerySet = timestampQuerySet;

}

@@ -1523,7 +1523,7 @@ class WebGPUBackend extends Backend {
const { resolveBuffer, resultBuffer } = renderContextData.currentTimestampQueryBuffers;


encoder.resolveQuerySet( renderContextData.timeStampQuerySet, 0, 2, resolveBuffer, 0 );
encoder.resolveQuerySet( renderContextData.timestampQuerySet, 0, 2, resolveBuffer, 0 );

if ( resultBuffer.mapState === 'unmapped' ) {

0 comments on commit 3af0d63

Please sign in to comment.