Commit Graph

2 Commits

Author SHA1 Message Date
dan sinclair 7092786f31 Fixup return of HLSL sign to match WGSL.
The HLSL `sign` method returns an `int` result (scalar or vector). The
WGSL `sign` expects the result to be the same type as the argument. This
CL injects a cast to the correct type after the `sign` call in the HLSL
generated source.

Bug: tint:1795
Change-Id: I51fed24b5b8b752b6b27fdfb5dd47eb803902793
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116692
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-01-11 13:18:29 +00:00
Ben Clayton 7017ec264c tint: Implement signed-int overloads of sign()
Bug: tint:1581
Fixed: tint:1782
Change-Id: Ia029bf9d1ce1d978c5cabc3016cb8ad1b4bac06a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113243
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-12-07 19:52:49 +00:00