Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jul 11, 2024
1 parent c2da52c commit 3542842
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sample/occlusionQuery/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ const occlusionQuerySet = device.createQuerySet({

const resolveBuffer = device.createBuffer({
label: 'resolveBuffer',
size: objectInfos.length * 8,
// Query results are 64bit unsigned integers.
size: objectInfos.length * BigUint64Array.BYTES_PER_ELEMENT,
usage: GPUBufferUsage.QUERY_RESOLVE | GPUBufferUsage.COPY_SRC,
});

const resultBuffer = device.createBuffer({
label: 'resultBuffer',
size: objectInfos.length * 8,
size: resolveBuffer.size,
usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ,
});

Expand Down

0 comments on commit 3542842

Please sign in to comment.