mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 07:06:11 +00:00
GLSL: support any() and all() on scalars.
It's a no-op. Bug: tint:1462 Change-Id: Ic79f33682097be075eb2e99b714d1e65bed10d4d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82365 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
628289e17d
commit
ecb570ff64
@@ -689,6 +689,12 @@ bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
|
||||
// GLSL does not support abs() on unsigned arguments. However, it's a no-op.
|
||||
return EmitExpression(out, expr->args[0]);
|
||||
}
|
||||
if ((builtin->Type() == sem::BuiltinType::kAny ||
|
||||
builtin->Type() == sem::BuiltinType::kAll) &&
|
||||
TypeOf(expr->args[0])->UnwrapRef()->is_scalar()) {
|
||||
// GLSL does not support any() or all() on scalar arguments. It's a no-op.
|
||||
return EmitExpression(out, expr->args[0]);
|
||||
}
|
||||
if (builtin->IsBarrier()) {
|
||||
return EmitBarrierCall(out, builtin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user