Skip to content

Commit

Permalink
Fix memory leak in vertex_buffer_OOB,vertex_step_mode (gpuweb#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzm-intel committed May 20, 2022
1 parent e48651d commit b5cc682
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webgpu/api/validation/encoding/cmds/render/draw.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ drawIndexedIndirect as it is GPU-validated.
size: bufferSize,
usage: GPUBufferUsage.INDEX | GPUBufferUsage.COPY_DST,
};
const indexBuffer = t.device.createBuffer(desc);
const indexBuffer = t.createBufferWithState('valid', desc);

const drawCallParam: DrawIndexedParameter = {
indexCount: drawIndexCount,
Expand Down Expand Up @@ -330,7 +330,7 @@ success/error as expected. Such set of buffer parameters should include cases li
);
const vertexBufferSize = setBufferOffset + setVertexBufferSize;

const vertexBuffer = t.device.createBuffer({
const vertexBuffer = t.createBufferWithState('valid', {
size: vertexBufferSize,
usage: GPUBufferUsage.VERTEX,
});
Expand Down Expand Up @@ -382,7 +382,7 @@ success/error as expected. Such set of buffer parameters should include cases li
size: indexBufferSize,
usage: GPUBufferUsage.INDEX | GPUBufferUsage.COPY_DST,
};
const indexBuffer = t.device.createBuffer(desc);
const indexBuffer = t.createBufferWithState('valid', desc);

const drawParam: DrawIndexedParameter = {
indexCount,
Expand Down

0 comments on commit b5cc682

Please sign in to comment.