dawn-cmake/test/tint/builtins/gen/firstTrailingBit/cb51ce.wgsl.expected.wgsl
Ben Clayton df3630c194 builtins: Add firstTrailingBit
Currently polyfilled for all backends.
HLSL should be able to map this to 'firstbitlow', but there might need
to be some special case handling for 0 (undocumented behavior). For now
just polyfill.

CTS tests: https://github.com/gpuweb/cts/pull/1003

Bug: tint:1367
Bug: tint:1449
Change-Id: I8125b32687196678906e5a9d056b4f2efd885073
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81502
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-02-23 14:32:14 +00:00

20 lines
365 B
WebGPU Shading Language

fn firstTrailingBit_cb51ce() {
var res : vec3<u32> = firstTrailingBit(vec3<u32>());
}
@stage(vertex)
fn vertex_main() -> @builtin(position) vec4<f32> {
firstTrailingBit_cb51ce();
return vec4<f32>();
}
@stage(fragment)
fn fragment_main() {
firstTrailingBit_cb51ce();
}
@stage(compute) @workgroup_size(1)
fn compute_main() {
firstTrailingBit_cb51ce();
}