https://github.com/shader-slang/slang
Revision 896e460dc8146bc9a39296ea72f320fe3db28cee authored by Tim Foley on 18 June 2019, 18:58:25 UTC, committed by GitHub on 18 June 2019, 18:58:25 UTC
A literal like:

    2.0h

is supposed to default to `half` precision, but there was a typo in our logic that meant that the `half` case was mistakenly checking for `l` and not `h` and so it would never trigger (because the `double` case right before it was checking for `l` first), and certainly wouldn't trigger on an `h`.

There was also a bug that a literal with `hf`:

    2.0hf

would go into the path for the `f` suffix without considering the `h`.

These changes really ought to have some tests for them, but this was also just a quick issue I noticed while working on something else.
1 parent 0e052cf
History
Tip revision: 896e460dc8146bc9a39296ea72f320fe3db28cee authored by Tim Foley on 18 June 2019, 18:58:25 UTC
Fix bug in handling of `h` literal suffix. (#990)
Tip revision: 896e460
File Mode Size
docs
examples
external
source
tests
tools
.editorconfig -rw-r--r-- 937 bytes
.gitattributes -rw-r--r-- 95 bytes
.gitignore -rw-r--r-- 407 bytes
.gitmodules -rw-r--r-- 406 bytes
.travis.yml -rw-r--r-- 1.7 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.1 KB
LICENSE -rw-r--r-- 1.1 KB
README.md -rw-r--r-- 6.7 KB
appveyor.yml -rw-r--r-- 3.7 KB
premake5.lua -rw-r--r-- 26.7 KB
slang-com-helper.h -rw-r--r-- 4.8 KB
slang-com-ptr.h -rw-r--r-- 4.8 KB
slang.h -rw-r--r-- 93.8 KB
slang.sln -rw-r--r-- 9.8 KB
test.bat -rw-r--r-- 1.4 KB
travis_build.sh -rw-r--r-- 304 bytes
travis_test.sh -rw-r--r-- 435 bytes

README.md

back to top