Commit Graph

3 Commits

Author SHA1 Message Date
Ben Clayton f1f56b2d3c tint/writer/glsl: Set default precision to highp
WGSL states that `f32` is a IEEE-754 binary32. mediump precision guarantees are much smaller than highp, and using mediump can break code generated by tint.

Change-Id: I8a129c4c8ac078c785e0d5d7d21f19ed6b3620b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/123400
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2023-03-09 19:58:23 +00:00
dan sinclair 6cc183c85a Generic template and forward in stringstream.
This CL updates the templates in the StringStream to match more types.
All of the internal `operator<<` methods have been converted over to
StringStream. The precision was increased in order to better match the
precision needed to read back as a double.

Bug: tint:1686
Change-Id: Iaa15cf247f174967dd1014647ba5a74804997c22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122080
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2023-03-02 21:28:45 +00:00
dan sinclair efe9c49819 Add const-eval for `degrees` and `radians`
This CL adds const-eval for `degrees` and `radians`.

Bug: tint:1581
Change-Id: I7f00e2b1e5ab7c8e895680a6b75b9531dac31f5a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110601
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
2022-11-21 18:00:01 +00:00