summaryrefslogtreecommitdiff
path: root/tests/ir
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2021-03-26 10:53:58 -0700
committerGitHub <noreply@github.com>2021-03-26 10:53:58 -0700
commit129faf8c4af4a57b7f1c71749f45b31aebfab038 (patch)
tree8ce3f618abf76d9144e28ac5860e425866cb866a /tests/ir
parentabb020b15c4f1057657e5f8f63c02b15615bf6ec (diff)
Append proper suffixes to 16-bit literals for GLSL (#1767)
* Append proper suffixes to 16-bit literals for GLSL The GLSL output path wasn't putting suffixes on literals of 16-bit types, and that was leading to compilation errors in downstream `glslang`. This change adds the suffixes defined by `GL_EXT_shader_explicit_arithmetic_types`. This change also wraps up 8-bit literals so that they are emitted as, e.g., `int8_t(1)` instead of just `1`, to make sure we don't have implicit conversions in the output GLSL that weren't implicit in the Slang IR. We similarly wrap floating-point special values like infinities in their desired types when the type is `float` (e.g., `double(1.0 / 0.0)` for a double-precision infinity). Note: Standad IEEE 754 half-precision doesn't provide an encoding for infinite or not-a-number values, so it might be considered an error if we emit `half(1.0 / 0.0)` but there really isn't a significantly better alternative for us to emit. * fixup
Diffstat (limited to 'tests/ir')
-rw-r--r--tests/ir/string-literal.slang.expected4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ir/string-literal.slang.expected b/tests/ir/string-literal.slang.expected
index 80d7ce67c..91a6ccec2 100644
--- a/tests/ir/string-literal.slang.expected
+++ b/tests/ir/string-literal.slang.expected
@@ -1,8 +1,8 @@
result code = 0
standard error = {
### LOWER-TO-IR:
-[entryPoint(6, "main")]
-[numThreads(1, 1, 1)]
+[entryPoint(6 : Int, "main")]
+[numThreads(1 : Int, 1 : Int, 1 : Int)]
[export("_S3tu04mainp1puV")]
[nameHint("main")]
func %main : Func(Void, UInt)