diff --git a/src/webgpu/shader/execution/flow_control/harness.ts b/src/webgpu/shader/execution/flow_control/harness.ts index 94dfcdfc4d8f..885e32bd4aec 100644 --- a/src/webgpu/shader/execution/flow_control/harness.ts +++ b/src/webgpu/shader/execution/flow_control/harness.ts @@ -221,9 +221,8 @@ ${main_wgsl.extra} // returns a string that shows the outputted values to help understand the whole trace. const print_output_value = () => { - return `Output values (length: ${outputCount}): ${outputs.data - .slice(1, outputCount + 1) - .join(', ')}`; + const subarray = outputs.data.subarray(1, outputCount + 1); + return `Output values (length: ${outputCount}): ${subarray.join(', ')}`; }; // returns a colorized string of the expect_order() call, highlighting