https://github.com/shader-slang/slang
Revision 129faf8c4af4a57b7f1c71749f45b31aebfab038 authored by Tim Foley on 26 March 2021, 17:53:58 UTC, committed by GitHub on 26 March 2021, 17:53:58 UTC
* 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
1 parent abb020b
Tip revision: 129faf8c4af4a57b7f1c71749f45b31aebfab038 authored by Tim Foley on 26 March 2021, 17:53:58 UTC
Append proper suffixes to 16-bit literals for GLSL (#1767)
Append proper suffixes to 16-bit literals for GLSL (#1767)
Tip revision: 129faf8
File | Mode | Size |
---|---|---|
.github | ||
build | ||
docs | ||
examples | ||
external | ||
extras | ||
prelude | ||
source | ||
tests | ||
tools | ||
.editorconfig | -rw-r--r-- | 937 bytes |
.gitattributes | -rw-r--r-- | 95 bytes |
.gitignore | -rw-r--r-- | 1.0 KB |
.gitmodules | -rw-r--r-- | 951 bytes |
CODE_OF_CONDUCT.md | -rw-r--r-- | 3.1 KB |
LICENSE | -rw-r--r-- | 1.1 KB |
README.md | -rw-r--r-- | 8.6 KB |
github_build.sh | -rw-r--r-- | 495 bytes |
github_test.sh | -rw-r--r-- | 546 bytes |
premake.bat | -rw-r--r-- | 120 bytes |
premake5.lua | -rw-r--r-- | 48.2 KB |
slang-com-helper.h | -rw-r--r-- | 4.8 KB |
slang-com-ptr.h | -rw-r--r-- | 4.9 KB |
slang-gfx.h | -rw-r--r-- | 49.7 KB |
slang-tag-version.h | -rw-r--r-- | 36 bytes |
slang.h | -rw-r--r-- | 168.7 KB |
slang.sln | -rw-r--r-- | 17.9 KB |
test.bat | -rw-r--r-- | 1.4 KB |
Computing file changes ...