mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-04 20:25:56 +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
349 B
WebGPU Shading Language
20 lines
349 B
WebGPU Shading Language
fn firstTrailingBit_3a2acc() {
|
|
var res : i32 = firstTrailingBit(1);
|
|
}
|
|
|
|
@stage(vertex)
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
firstTrailingBit_3a2acc();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
@stage(fragment)
|
|
fn fragment_main() {
|
|
firstTrailingBit_3a2acc();
|
|
}
|
|
|
|
@stage(compute) @workgroup_size(1)
|
|
fn compute_main() {
|
|
firstTrailingBit_3a2acc();
|
|
}
|