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@if(MESHLET_2D_DISPATCH)
20@group(0) @binding(3) var<storage, read_write> meshlet_software_raster_cluster_count: u32;
22@compute
23@workgroup_size(1, 1, 1)
24fn fill_counts() {
25 @if(MESHLET_2D_DISPATCH)
26 meshlet_previous_raster_counts[0] += meshlet_software_raster_cluster_count;
27 @else
28 meshlet_previous_raster_counts[0] += meshlet_software_raster_indirect_args.x;
29 meshlet_software_raster_indirect_args.x = 0;
31 meshlet_previous_raster_counts[1] += meshlet_hardware_raster_indirect_args.instance_count;
32 meshlet_hardware_raster_indirect_args.instance_count = 0;
Contents