readQueryResults method

  1. @override
Future<List<int>> readQueryResults(
  1. QuerySet querySet, {
  2. int first = 0,
  3. int? count,
})

The results of count queries of querySet from first, once every pass submitted before this call has finished: sample counts for occlusion, nanoseconds for timestamps, and for pipeline statistics one value per PipelineStatistic per query, in its order. A query no pass wrote reads zero. By default refused by the feature of the set's own type.

Implementation

@override
Future<List<int>> readQueryResults(
  QuerySet querySet, {
  int first = 0,
  int? count,
}) {
  final n = count ?? querySet.count - first;
  if (first < 0 || n < 0 || first + n > querySet.count) {
    throw RangeError(
      'readQueryResults: $n queries from $first leave a set of '
      '${querySet.count}',
    );
  }
  return webgpuReadQueries(_gpuDevice, querySet, first, n);
}