Skip to content

Commit

Permalink
Remove getDeviceMismatchedBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxli committed Mar 22, 2022
1 parent 108e5f5 commit bd38ced
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/webgpu/api/validation/validation_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,18 @@ export class ValidationTest extends GPUTest {
}
}

/** Return a GPUBuffer with descriptor from mismatched device. */
getDeviceMismatchedBuffer(descriptor: GPUBufferDescriptor): GPUBuffer {
return this.trackForCleanup(this.mismatchedDevice.createBuffer(descriptor));
}

/** Create an arbitrarily-sized GPUBuffer with the STORAGE usage from mismatched device. */
getDeviceMismatchedStorageBuffer(): GPUBuffer {
return this.getDeviceMismatchedBuffer({ size: 4, usage: GPUBufferUsage.STORAGE });
return this.trackForCleanup(
this.mismatchedDevice.createBuffer({ size: 4, usage: GPUBufferUsage.STORAGE })
);
}

/** Create an arbitrarily-sized GPUBuffer with the UNIFORM usage from mismatched device. */
getDeviceMismatchedUniformBuffer(): GPUBuffer {
return this.getDeviceMismatchedBuffer({ size: 4, usage: GPUBufferUsage.UNIFORM });
return this.trackForCleanup(
this.mismatchedDevice.createBuffer({ size: 4, usage: GPUBufferUsage.UNIFORM })
);
}

/** Return a GPUTexture with descriptor from mismatched device. */
Expand Down Expand Up @@ -263,11 +262,6 @@ export class ValidationTest extends GPUTest {
});
}

/** Return a GPUQuerySet with descriptor from mismatched device. */
getDeviceMismatchedQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet {
return this.trackForCleanup(this.mismatchedDevice.createQuerySet(descriptor));
}

getDeviceMismatchedBindingResource(bindingType: ValidBindableResource): GPUBindingResource {
switch (bindingType) {
case 'uniformBuf':
Expand Down

0 comments on commit bd38ced

Please sign in to comment.