mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-01 20:21:23 +00:00
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>
20 lines
365 B
WebGPU Shading Language
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();
|
|
}
|