diff --git a/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts b/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts index 175244697829..2e4123c6cfeb 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/texture_utils.ts @@ -263,14 +263,16 @@ export function graphWeights(height: number, weights: number[]) { /** * Validates the weights go from 0 to 1 in increasing order. */ -function validateWeights(stage: string, weights: number[]) { - const showWeights = () => ` +function validateWeights(t: GPUTest, stage: string, weights: number[]) { + const showWeights = t.rec.debugging + ? () => ` ${weights.map((v, i) => `${i.toString().padStart(2)}: ${v}`).join('\n')} e = expected A = actual ${graphWeights(32, weights)} -`; +` + : () => ``; // Validate the weights assert( @@ -586,8 +588,8 @@ export async function queryMipLevelMixWeightsForDevice(t: GPUTest, stage: Shader const [sampleLevelWeights, gradWeights] = unzip(result, kNumWeightTypes, 4); - validateWeights(stage, sampleLevelWeights); - validateWeights(stage, gradWeights); + validateWeights(t, stage, sampleLevelWeights); + validateWeights(t, stage, gradWeights); texture.destroy(); storageBuffer.destroy();