mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 13:11:34 +00:00
Currently polyfilled for all backends. HLSL should be able to map this to 'firstbithigh', 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/1004 Bug: tint:1367 Bug: tint:1449 Change-Id: I9c9a08ea93d1c4a602e0ab763e95e2eea336fb0d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81503 Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
20 lines
360 B
WebGPU Shading Language
20 lines
360 B
WebGPU Shading Language
fn firstLeadingBit_3fd7d0() {
|
|
var res : vec3<u32> = firstLeadingBit(vec3<u32>());
|
|
}
|
|
|
|
@stage(vertex)
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
firstLeadingBit_3fd7d0();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
@stage(fragment)
|
|
fn fragment_main() {
|
|
firstLeadingBit_3fd7d0();
|
|
}
|
|
|
|
@stage(compute) @workgroup_size(1)
|
|
fn compute_main() {
|
|
firstLeadingBit_3fd7d0();
|
|
}
|