Shader Explorer
Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

radix.wgsl

Constants

NUM_BANKS

#
const NUM_BANKS: u32 = 16u

LOG_NUM_BANKS

#
const LOG_NUM_BANKS: u32 = 4u

Bindings

sorting_pass_index

#
@group(3)
@binding(0)
var<uniform> sorting_pass_index: u32

sorting

#
@group(3)
@binding(1)
var<storage, read_write> sorting: SortingGlobal

status_counters

#
@group(3)
@binding(2)
var<storage, read_write> status_counters: atomic<u32>

draw_indirect

#
@group(3)
@binding(3)
var<storage, read_write> draw_indirect: DrawIndirect

input_entries

#
@group(3)
@binding(4)
var<storage, read_write> input_entries: array<Entry>

output_entries

#
@group(3)
@binding(5)
var<storage, read_write> output_entries: array<Entry>

Structures

SortingGlobal

#
struct SortingGlobal {
digit_histogram: array ,
assignment_counter: atomic<u32>, ,
}

SortingSharedC

#
struct SortingSharedC {
entries: array ,
gather_sources: array ,
}

Functions

radix_sort_a

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(#{RADIX_BASE}, #{RADIX_DIGIT_PLACES})
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn radix_sort_a (
@builtin(local_invocation_id)
gl_LocalInvocationID: vec3<u32>
@builtin(global_invocation_id)
gl_GlobalInvocationID: vec3<u32>
)

radix_sort_b

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(1)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn radix_sort_b (
@builtin(global_invocation_id)
gl_GlobalInvocationID: vec3<u32>
)

conflict_free_offset

#
fn conflict_free_offset ( ) -> u32

exclusive_scan

#
fn exclusive_scan (
local_invocation_index: u32
value: u32
) -> u32