Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Nov 25, 2024
1 parent 38283ba commit cff4b8a
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions src/webgpu/gpu_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ function setAllLimitsToAdapterLimits(
const descWithMaxLimits: CanonicalDeviceDescriptor = {
requiredFeatures: [],
defaultQueue: {},
...(desc ?? desc),
...desc,
requiredLimits: getAdapterLimitsAsDeviceRequiredLimits(adapter),
};
return descWithMaxLimits;
Expand All @@ -1331,36 +1331,13 @@ export class MaxLimitsGPUTestSubcaseBatchState extends GPUTestSubcaseBatchState
/**
* A Test that requests all the max limits from the adapter on the device.
*/
export class MaxLimitsTest extends GPUTestBase {
// Should never be undefined in a test. If it is, init() must not have run/finished.
private provider: DeviceProvider | undefined;

export class MaxLimitsTest extends GPUTest {
public static override MakeSharedState(
recorder: TestCaseRecorder,
params: TestParams
): GPUTestSubcaseBatchState {
return new MaxLimitsGPUTestSubcaseBatchState(recorder, params);
}

override async init() {
await super.init();

this.provider = await this.sharedState.acquireProvider();
}

/** GPUAdapter that the device was created from. */
get adapter(): GPUAdapter {
assert(this.provider !== undefined, 'internal error: DeviceProvider missing');
return this.provider.adapter;
}

/**
* GPUDevice for the test to use.
*/
override get device(): GPUDevice {
assert(this.provider !== undefined, 'internal error: DeviceProvider missing');
return this.provider.device;
}
}

/**
Expand Down

0 comments on commit cff4b8a

Please sign in to comment.