fn cs(
        @builtin(local_invocation_id) local_invocation_id: vec3u,
      ) {
        var sum = vec4u(0);
        let numChunks = arrayLength(&histogramChunks);
        for (var i = 0u; i < numChunks; i++) {
          sum += histogramChunks[i][local_invocation_id.x];
        }
        histogram[local_invocation_id.x] = sum;
      }
    `,
  });

  const histogramChunkPipeline = device.createComputePipeline({
    label: 'histogram',
    layout: 'auto',
    compute: {
      module: histogramChunkModule,
