From 11c9521081a78cad0a7d4579573f6632e6346c56 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Thu, 12 Dec 2024 10:34:44 +0900 Subject: [PATCH] address comments --- .../limits/maxStorageBuffersPerShaderStage.spec.ts | 4 ++-- src/webgpu/gpu_test.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage.spec.ts b/src/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage.spec.ts index 05c737774c70..38828eef261d 100644 --- a/src/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage.spec.ts +++ b/src/webgpu/api/validation/capability_checks/limits/maxStorageBuffersPerShaderStage.spec.ts @@ -171,7 +171,7 @@ g.test('createPipeline,at_over') (bindingCombination === 'fragment' || bindingCombination === 'vertexAndFragmentWithPossibleVertexStageOverflow' || bindingCombination === 'vertexAndFragmentWithPossibleFragmentStageOverflow') && - testValue > device.limits.maxStorageBuffersInFragmentStage, + testValue > (device.limits.maxStorageBuffersInFragmentStage ?? actualLimit), `can not test ${testValue} bindings as it is more than maxStorageBuffersInFragmentStage(${device.limits.maxStorageBuffersInFragmentStage})` ); @@ -179,7 +179,7 @@ g.test('createPipeline,at_over') (bindingCombination === 'vertex' || bindingCombination === 'vertexAndFragmentWithPossibleVertexStageOverflow' || bindingCombination === 'vertexAndFragmentWithPossibleFragmentStageOverflow') && - testValue > device.limits.maxStorageBuffersInVertexStage, + testValue > (device.limits.maxStorageBuffersInVertexStage ?? actualLimit), `can not test ${testValue} bindings as it is more than maxStorageBuffersInVertexStage(${device.limits.maxStorageBuffersInVertexStage})` ); diff --git a/src/webgpu/gpu_test.ts b/src/webgpu/gpu_test.ts index 7ecd7c0befa0..53e4a1481791 100644 --- a/src/webgpu/gpu_test.ts +++ b/src/webgpu/gpu_test.ts @@ -71,10 +71,10 @@ import { reifyExtent3D, reifyOrigin3D } from './util/unions.js'; declare global { // MAINTENANCE_TODO: remove once added to @webgpu/types interface GPUSupportedLimits { - readonly maxStorageBuffersInFragmentStage: number; - readonly maxStorageTexturesInFragmentStage: number; - readonly maxStorageBuffersInVertexStage: number; - readonly maxStorageTexturesInVertexStage: number; + readonly maxStorageBuffersInFragmentStage?: number; + readonly maxStorageTexturesInFragmentStage?: number; + readonly maxStorageBuffersInVertexStage?: number; + readonly maxStorageTexturesInVertexStage?: number; } }