From cff4b8ad189dd1c8496f8b5dc56f9fe659b7d882 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Mon, 25 Nov 2024 15:51:37 -0800 Subject: [PATCH] address comments --- src/webgpu/gpu_test.ts | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/webgpu/gpu_test.ts b/src/webgpu/gpu_test.ts index 342deefd57a4..66c7c1208c28 100644 --- a/src/webgpu/gpu_test.ts +++ b/src/webgpu/gpu_test.ts @@ -1306,7 +1306,7 @@ function setAllLimitsToAdapterLimits( const descWithMaxLimits: CanonicalDeviceDescriptor = { requiredFeatures: [], defaultQueue: {}, - ...(desc ?? desc), + ...desc, requiredLimits: getAdapterLimitsAsDeviceRequiredLimits(adapter), }; return descWithMaxLimits; @@ -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; - } } /**