<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tools/slang-test/main.cpp, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2019-01-07T14:14:01+00:00</updated>
<entry>
<title>Feature/unique tool source names (#766)</title>
<updated>2019-01-07T14:14:01+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-01-07T14:14:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d155eaa92d56a4ec00109d25c8c70fe12fb96c2e'/>
<id>urn:sha1:d155eaa92d56a4ec00109d25c8c70fe12fb96c2e</id>
<content type='text'>
* Remove AppContext. Use StdChannels to hold writers, and TestToolUtil to hold test tool specific functionality.

* StdChannels -&gt; StdWriters

* getStdOut -&gt; getOut, getStdError -&gt; getError

* Renamed main.cpp files of tools to try and stop visual studio getting confused between files - such that clicking on an error takes editor to the right location.
</content>
</entry>
<entry>
<title>Feature/remove app context (#765)</title>
<updated>2018-12-21T16:00:28+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-12-21T16:00:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=efa2c8f41aa5cd2c27990fd9b57ea0eff06976e7'/>
<id>urn:sha1:efa2c8f41aa5cd2c27990fd9b57ea0eff06976e7</id>
<content type='text'>
* Remove AppContext. Use StdChannels to hold writers, and TestToolUtil to hold test tool specific functionality.

* StdChannels -&gt; StdWriters

* getStdOut -&gt; getOut, getStdError -&gt; getError
</content>
</entry>
<entry>
<title>* Made 'sub command' git-like - with parameters before going to slang-test and after going to the tool (#764)</title>
<updated>2018-12-21T14:28:05+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-12-21T14:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b5bda9b3d155234be079debe6997cbc900773cf2'/>
<id>urn:sha1:b5bda9b3d155234be079debe6997cbc900773cf2</id>
<content type='text'>
* Document some of the changes to command line invocation
* Make -v option display the effective command that is being used to run the test</content>
</entry>
<entry>
<title>Fix for byte-address buffers on Vulkan (#760)</title>
<updated>2018-12-18T14:57:18+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-12-18T14:57:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b6a54744b6980041de0706fdcd9cba57cb706ff1'/>
<id>urn:sha1:b6a54744b6980041de0706fdcd9cba57cb706ff1</id>
<content type='text'>
* Fix output comparison for compute tests

There was some vestigial logic there that was first doing a string-based comparison of actual/expected output, and then falling back to a path that parsed the expected output as a float, then converted that to an integer, then printed that integer in hex, and did the comparison with the result of that conversion.

I'm not even clear on what that code was trying to accomplish, but its main effect was allowing a test failure to slide by unnoticed becaues somehow an all-zeroes actual output file was matching an expected output file with no zeros. My understanding is that it went something like this:

* The first line of expected output was `A` (as in hexidecimal for the decimal integer `10`), and the first line of actual output was `0`.

* The `StringToFloat` function was failing on the input string `"A"` and returned `0.0` to indicate failure (rather than reporting any kind of error)

* We then converted the `0.0` to integer `0` and converted it to a base-16 string `"0"`

* The comparison to the actual output passed, and then a careless early exit in the comparison loop meant that a full test would pass as soon as one line of output passed according to this "second change" logic.

This change removes the broken code in the test runner since nothing was relying on it, other than the one broken test case we wanted to fix anyway.

* Fix the declarations of byte-address buffer methods for Vulkan

The HLSL `ByteAddressBuffer` and `RWByteAddressBuffer` types have methods `Load` and `Store` that take *byte* offsets from the start of the buffer, but we translate them into GLSL that uses `uint[]` array, so that indexing into that array will be off by a factor of four.

Somehow the code for mutable byte address buffers was written to add 4, 8, and 12 bytes to the base offset of a vector to get to its subsequent components, but I never thought about the implications this would have for the base address itself.

This change includes the following fixes:

* Any place in the translation of a byte-address `Load` or `Store` method that was using the address/offset value has been changed to use `$1 / 4` instead of `$1`.

* The offsets of 4, 8, and 12 have been changed to 1, 2, and 3 since they are now being added to an *index* instead of a byte offset

* The `GetDimensions` methods have introduced a factor of `* 4` to account for the fact that they need to return a byte size and not a count of elements.

With this change the existing `byte-address-buffer` test now produces the desired output under Vulkan.
</content>
</entry>
<entry>
<title>Feature/test tool shared libraries (#758)</title>
<updated>2018-12-17T14:22:14+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-12-17T14:22:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d2ddc590601778f309c81f7d19d5e7fed34210de'/>
<id>urn:sha1:d2ddc590601778f309c81f7d19d5e7fed34210de</id>
<content type='text'>
* Remove circular reference to renderer on Vk &amp; D3D12 DescriptorSetImpl

* Refactor Stbi image loading such that memory is correctly freed when goes out of scope.
Added Crt memory dump at termination.
Reduced erroneous reporting by scoping TestContext.

* Used capitalized acronym for STBImage to keep Tim happy.

* Split out TestReporter - to just handle reporting test results
Split out Options
Made TestContext hold options, and the reporter
Removed remaining memory leaks.

* Small optimization for rawWrite, such that it directly writes over print..

* Improve comments on TestCategorySet

* Fix typos in TestCategorySet

* Made slangc a cpp file as part of slang-test (removing need for separate project/shared library).

* * Made all test tools only available as dlls.
* Made possible to invoke test tool dll from command line

slang-test slangc [--bindir xxx] options to slangc

* Fix Visual Studio projects that are no longer needed.
</content>
</entry>
<entry>
<title>Fix memory leaks around slang-test (#757)</title>
<updated>2018-12-14T20:24:21+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-12-14T20:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d43c566fa29bbc0da1534aea236d54ee5ca104b8'/>
<id>urn:sha1:d43c566fa29bbc0da1534aea236d54ee5ca104b8</id>
<content type='text'>
* Remove circular reference to renderer on Vk &amp; D3D12 DescriptorSetImpl

* Refactor Stbi image loading such that memory is correctly freed when goes out of scope.
Added Crt memory dump at termination.
Reduced erroneous reporting by scoping TestContext.

* Used capitalized acronym for STBImage to keep Tim happy.

* Split out TestReporter - to just handle reporting test results
Split out Options
Made TestContext hold options, and the reporter
Removed remaining memory leaks.

* Small optimization for rawWrite, such that it directly writes over print..

* Improve comments on TestCategorySet

* Fix typos in TestCategorySet
</content>
</entry>
<entry>
<title>Remove memory and resource leaks (#754)</title>
<updated>2018-12-13T23:14:38+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-12-13T23:14:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=11793edf25a4907fe396d69fd3cdddaee3d421d5'/>
<id>urn:sha1:11793edf25a4907fe396d69fd3cdddaee3d421d5</id>
<content type='text'>
* Remove circular reference to renderer on Vk &amp; D3D12 DescriptorSetImpl

* Refactor Stbi image loading such that memory is correctly freed when goes out of scope.
Added Crt memory dump at termination.
Reduced erroneous reporting by scoping TestContext.

* Used capitalized acronym for STBImage to keep Tim happy.
</content>
</entry>
<entry>
<title>Running tests in slang-test process (#740)</title>
<updated>2018-12-12T13:57:48+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-12-12T13:57:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=49ed6b60d662906f290578f802f80b0ead1a2b9d'/>
<id>urn:sha1:49ed6b60d662906f290578f802f80b0ead1a2b9d</id>
<content type='text'>
* First pass at having an interface to write text to that can be replaced.
Simplifed and made more rigerous the interface used to write formatted strings.

* Added AppContext to simplify setting up and parsing around of streams.

* Added more simplified way to get the std error/out from AppContext.

* Work in progress using dll for tools to speed up testing.

* First pass at ISlangWriter interface.

* Added support for writing VaArgs.
Added NullWriter.

* Use ISlangWriter for output.

* Use ISlangWriter for output - replacing OutputCallback.
Make IRDump go to ISlangWriter

* SlangWriterTargetType -&gt; SlangWriterChannel
Improvements around AppContext

* Shared library working with slang-reflection-test.

* Dll testing working for render-test.

* Include va_list definintion from header.

* Fix errors from clang.

* Fix typo for linux.

* Added -usexes option

* Fix typo.

* Fix arguments problem on linux.

* Fix typo for linux.

* Add windows tool shared library projects.

* Fix warning from x86 win build.
Fix signed warning from slang-test/main.cpp

* First attempt at getting premake to work on travis, and run tests.

* Try moving build out into script.

* Invoke bash scripts so they don't have to be executable.

* Drive configuration/tests from env parameters set by travis

* Try using source to run travis tests.

* Remove the build.linux directory - but doing so will overwrite Makefile.

* Made -fno-delete-null-pointer-checks gcc only.

* Try to fix warning from -fno-delete-null-pointer-checks

* Turn of warnings for unknown switches.

* Try to make premake choose the correct tooling.

* Disabled missing braces warning.

* Disable -Wundefined-var-template on clang.

* -Wunused-function disabled for clang.

* Fix typo due to SlangBool.

* Remove this nullptr tests.

* "-Wno-unused-private-field" for clang.

* Added "-Wno-undefined-bool-conversion"

* Add DominatorList::end fix.

* Split scripts into travis_build.sh travis_test.sh

* Fix gcc/clang template pre-declaration issue around QualType.

* Fix premake to build such that pthread correctly links with slang-glslang
</content>
</entry>
<entry>
<title>Remove the "VM" and "bytecode" features (#745)</title>
<updated>2018-12-10T20:42:15+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-12-10T20:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b2997170df7cc2703de714a946a38dc35058e7f8'/>
<id>urn:sha1:b2997170df7cc2703de714a946a38dc35058e7f8</id>
<content type='text'>
* Remove the "VM" and "bytecode" features

The "bytecode" in `bc.{h,cpp}` was an initial attempt at a serialized encoding for the Slang IR, but we now have the `ir-serialize.{h,cpp}` approach which was has been kept up to date much better.

Similarly, the "VM" in `vm.{h,cpp}` was intended to be a system for interpreting Slang code in the bytecode format directly (so that you could load and evaluate code in a Slang module in a lightweight fashion). This never got used past a single test, which we eventually disabled.

There are good ideas in some of this code, but at this point the implementations have bit-rotted to a point where trying to maintain it is more costly than it would be to re-created it if/when we ever decide these features are important again.

* fixup: remove slang-eval-test from Makefile
</content>
</entry>
<entry>
<title>* Renamed  spSessionHasCompileTargetSupport to spSessionCheckCompileTargetSupport. (#728)</title>
<updated>2018-11-28T22:56:32+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-11-28T22:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7f0ccc5580faa43c2554d9d016c27ebe069362c5'/>
<id>urn:sha1:7f0ccc5580faa43c2554d9d016c27ebe069362c5</id>
<content type='text'>
* Improved return codes from spSessionCheckCompileTargetSupport</content>
</entry>
</feed>
