Author :
Shahbaz Youssefi
Date :
2021-07-16 14:49:08
Hash :32196d8f Message :Vulkan: SPIR-V Gen: Support built-ins with out parameters
Some built-ins have out parameters; modf, frexp, uaddCarry, usubBorrow,
umulExtended and imulExtended. In SPIR-V, they are translated as such:
- modf and frexp: Returns the same result as GLSL, with a pointer to
store the output parameter. Since SPIR-V cannot create pointers to
swizzles, a temp variable is used in that case.
- uaddCarry, usubBorrow, umulExtended and imulExtended: These return a
struct in SPIR-V, which contains the two output parameters; with lsb
in field 0 and msb in field 1.
Bug: angleproject:4889
Change-Id: Ic5114f74b9c1013093007e91939f78d5218f2a07
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3036088
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>