Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1/// Copies the counts of meshlets in the hardware and software buckets, resetting the counters in the process.
3struct DispatchIndirectArgs {
4 x: u32,
5 y: u32,
6 z: u32,
7}
9struct DrawIndirectArgs {
10 vertex_count: u32,
11 instance_count: u32,
12 first_vertex: u32,
13 first_instance: u32,
16@group(0) @binding(0) var<storage, read_write> meshlet_software_raster_indirect_args: DispatchIndirectArgs;
17@group(0) @binding(1) var<storage, read_write> meshlet_hardware_raster_indirect_args: DrawIndirectArgs;
18@group(0) @binding(2) var<storage, read_write> meshlet_previous_raster_counts: array<u32>;
19#ifdef MESHLET_2D_DISPATCH
20@group(0) @binding(3) var<storage, read_write> meshlet_software_raster_cluster_count: u32;
21#endif
23@compute
24@workgroup_size(1, 1, 1)
25fn fill_counts() {
26#ifdef MESHLET_2D_DISPATCH
27 meshlet_previous_raster_counts[0] += meshlet_software_raster_cluster_count;
28#else
29 meshlet_previous_raster_counts[0] += meshlet_software_raster_indirect_args.x;
30#endif
31 meshlet_software_raster_indirect_args.x = 0;
33 meshlet_previous_raster_counts[1] += meshlet_hardware_raster_indirect_args.instance_count;
34 meshlet_hardware_raster_indirect_args.instance_count = 0;
Contents