diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2020-04-20 16:24:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-20 16:24:49 -0700 |
| commit | 6d4fa92a86fe5d05dbfa248524cf976ab27f4444 (patch) | |
| tree | b931a3badcf6b18178d26fa980baba4426034072 /tests/cross-compile/half-conversion.slang | |
| parent | c4441d804aaa97bad7ff01bef505491d30bbc046 (diff) | |
Fix stdlib definitions of half<->float conversion (#1326)
These ended up being additional cases where we needed to use an explicit loop over components in the stdlib in order to produce valid GLSL output, but the existing declarations weren't doing it.
I added a very minimal cross-compilation test just to confirm that we generate valid SPIR-V for code using `f16tof32()`.
Diffstat (limited to 'tests/cross-compile/half-conversion.slang')
| -rw-r--r-- | tests/cross-compile/half-conversion.slang | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cross-compile/half-conversion.slang b/tests/cross-compile/half-conversion.slang new file mode 100644 index 000000000..316629f81 --- /dev/null +++ b/tests/cross-compile/half-conversion.slang @@ -0,0 +1,13 @@ +// half-conversion.slang + +//TEST:CROSS_COMPILE:-target spirv-assembly -entry main -stage fragment + +cbuffer C +{ + uint4 u; +} + +float4 main() : SV_Target +{ + return f16tof32(u); +} |
