<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/core/slang-cpp-compiler.h, 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-12-10T15:02:19+00:00</updated>
<entry>
<title>DownstreamCompiler abstraction (#1149)</title>
<updated>2019-12-10T15:02:19+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-12-10T15:02:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=79ec0cfdb5f3461c763e0bf712cf42eb87fccb90'/>
<id>urn:sha1:79ec0cfdb5f3461c763e0bf712cf42eb87fccb90</id>
<content type='text'>
* CPPCompiler -&gt; DownstreamCompiler

* Added DownstreamCompileResult to start abstraction such that we don't need files.

* * Split out slang-blob.cpp
* Made CompileResult hold a DownstreamCompileResult - for access to binary or ISlangSharedLibrary

* Keep temporary files in scope.

* Add a hash to the hex dump stream.

* Move all file tracking into DownstreamCompiler.
</content>
</entry>
<entry>
<title>CPU Performance/Testing improvements (#1055)</title>
<updated>2019-09-16T13:38:21+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-09-16T13:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=40d8f3aeedf018c7c6766e98ec64733abd90671e'/>
<id>urn:sha1:40d8f3aeedf018c7c6766e98ec64733abd90671e</id>
<content type='text'>
* First pass of render-test refactor.

* Make window construction a function that can choose an implementation.

* Remove OpenGL as currently has windows dependency.

* Disable Vulkan as Renderer impl has dependency on windows.

* Pass Window in as parameter of 'update'.

* Add win-window.cpp as was missing.

* Fix warning on windows about signs during comparison.

* * Added mechanism to add random arrays as buffer inputs and select type
* Improved RenderGenerator to generate more types, and to be more careful around int32 ranges.
* Added support for security checks (for Visual Studio C++)
* Disable Execption handling being on by default when compiling kernels
* Added a 'Group' version of the entry point that will evaluate all threads in a group in a single call. In test code use this method if available.
* Added -compile-arg to be able to pass arguments to the compile within render-test

* Add documention for the _Group execution feature.

* Fix some typos in cpu-target.md
</content>
</entry>
<entry>
<title>CPPCompiler::OutputMessage -&gt; CPPCompiler::Diagnostic (#1019)</title>
<updated>2019-08-14T19:02:21+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-08-14T19:02:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=27583e993aee508361fdccffc107c2f2765698ef'/>
<id>urn:sha1:27583e993aee508361fdccffc107c2f2765698ef</id>
<content type='text'>
* CPPCompiler::OutputMessage -&gt; CPPCompiler::Diagnostic

* Fix problem with merge.

* Fix another small merge issue around Diagnostic.
</content>
</entry>
<entry>
<title>Ability to set Paths on Pass Through/Back End Compilers (#1010)</title>
<updated>2019-08-12T20:28:18+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-08-12T20:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ea200663ffe33d7b4c739c0d84e9c21a3ae2ffa6'/>
<id>urn:sha1:ea200663ffe33d7b4c739c0d84e9c21a3ae2ffa6</id>
<content type='text'>
* Expanded prelude for some other resource types. Disable C++ output for ParameterGroup.

* WIP: Layout for CPU.

* Fixes to CPU layout.

* WIP: The uniform is output, but the variable definition is not.

* WIP: Entry point parameters to global scope in C++.
Handling of resource types (in so far as outputting)

* Some discussion of ABI and different input types.

* WIP: More C++ support around resource types.

* WIP: Split up variables into different structures on emit.

* WIP: Emitting C++ with wrapping up of 'Context'

* WIP: C++ code has access to semantic values.
Wrap in struct so can use method calls to pass shared state.
Disable  legalizeResourceTypes and legalizeExistentialTypeLayout

* Fix structured buffer layout for CPU.

* Remove testing/handling of global uniforms on CPU path.
Typo fix.
Changed CPU tests to use new CPU calling convention.

* Check globals are working. Initalize context to zero globals.

* Order the global parameters for C++ ouput by their layout.
Note - that layout isn't quite working correctly because the StructuredBuffer&lt;int&gt; the int seems to be consuming uniform space.

* Work around for reflection not having all data needed for layout ordering for C++ code.

* Output constant buffers as pointers.

* Entry point parameters accessed through pointer to struct.

* WIP: Layout for CPU is reasonable for test case.

* Only output 'f' after float literal if type marks as a float.

* Cast construction works on C++.

* Made IntrinsicOp::ConvertConstruct to make intent clearer.

* C++ handling construction from scalar.
Handle access of a scalar with .x.
Check default initialization.

* Comment about need for split of kIROp_construct.
Release build works.

* Added support from constructVectorFromScalar to C/C++ target.

* Handling of in/out in C/C++.

* First pass documentation CPU support.

* Improvements to C++/C slang code generation documentation.

* Small doc change to include need for mechansim to specify cpp compiler path.

* WIP: Being able to set path for backends.

* Better handling of swizzling - allow swizzling a scalar into a vector.

* Fix missing/broken headers for path setting on session.

* Fix for compiling using clang on Windows.

* Remove Clang test code.

* * Removed spSessionGetGlobalSession - no longer needed because SlangSession is slang::IGlobalSession alias.
* Gave Session a ref count on spCreateSession, and have it checked on spDestroySession, so behaves correctly as ISlangUnknown

Note that spDestroySession does a release (and checks the ref count on debug builds). It's behaviour could be the same as just release, but this seems closer to the original intention.
</content>
</entry>
<entry>
<title>Callable CPU code support (#1014)</title>
<updated>2019-08-12T19:41:41+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-08-12T19:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6fc2c37d9a4c408331db1b33deb3b46e74d2a7d2'/>
<id>urn:sha1:6fc2c37d9a4c408331db1b33deb3b46e74d2a7d2</id>
<content type='text'>
* First pass support for compiling to a loaded shared library.

* Improve documentation for cpu target.

* Removed the SLANG_COMPILE_FLAG_LOAD_SHARED_LIBRARY flag.
Use the SLANG_HOST_CALLABLE code target
Document mechanism.

* Fix typo in cpp-resource.slang
In test code if the target is 'callable' we don't need to compile (indeed there is no source file).

* Small refactor using CommandLineCPPCompiler as base class to implement VisualStudioCPPCompiler and GCCCPPCompiler.

* Improvements around CPPCompiler.
Mechanism to know products produced.
Cleaning up products after execution.

* Fix multiple definition of 'SourceType'
</content>
</entry>
<entry>
<title>Slang -&gt; C++ -&gt; SharedLibrary -&gt; Test (#999)</title>
<updated>2019-07-17T14:26:37+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-07-17T14:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=749634a2a6e03acf435c39f78b933a01b90a7440'/>
<id>urn:sha1:749634a2a6e03acf435c39f78b933a01b90a7440</id>
<content type='text'>
* WIP: Adding support for C/C++ compilation to slang API.

* Removed BackEndType in test harness -&gt; use SlangPassThrough to identify backends
Only require stage for targets that require it.
Detection of all different backends.

* Windows/Unix create temporary filename.

* WIP: Output CPU binaries.

* Added a pass-through c/c++ test.

* Compile C++/C and store in temporary file.

* Read the binary back into memory.

* Set debug info and optimization flags for C/C++.
Make the CPPCompiler debug/optimization levels match slangs.

* Handling of include paths and math precision.

* Dumping c++/c source and exe/shared library.

* Put hex dump into own util.

* End to end pass through c compilation test.

* WIP: Simple execute test working on Linux/Unix.

* Fix typo on linux.

* WIP: To compile slang to cpp shared library. Report backend compiler errors.

* Compiles slang -&gt; cpp and loads as shared library.

* Fix problem on c-cross-compile test because prelude is now included with &lt;&gt; quotes.

* Run slang generated cpp code - using hard coded data.

* Added cpp-execute-simple, and test output.

* Fix warning that broke win32 build.

* Fix compilation problem on osx.
</content>
</entry>
<entry>
<title>Parsing CPP Compiler output (#994)</title>
<updated>2019-06-21T21:39:32+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-06-21T21:39:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=714b0881974965e8fcfbc57b452ef648290d14a1'/>
<id>urn:sha1:714b0881974965e8fcfbc57b452ef648290d14a1</id>
<content type='text'>
* Added extractLine line parsing to StringUtil. Use for matching lines instead of calcLines. calcLines uses extractLine to extract lines.
Fixed problems found in output of some tests- due to how a how final line is handled. Now a final line has a \r or \n\r combination, but nothing else after it, it is considered the last line (not the line after it).

* Use StringUtil::extractLine in slang-generate.

* Improved comment on extractLine

* Remove test code from StringUtil::extractLine

* Made StringUtil::extractLine act as if line terminators are 'separators'.
Added unit-test-string.cpp - to check behavior.

* Adding LineParser - not entirely necessary, but slightly easier to use.

* Hack to output start of tests.

* WIP parsing CPPCompiler output.

* Make extractLine return a bool.

* First attempt at Visual Studio output parsing.

* Add handling for checking error returning from CPPCompiler.

* First pass parsing output of Gcc/Clang.

* Split out VisualStudioCompilerUtil and GCCCompilerUtil.
Simplified parsing of versions.

* Simplify CPPCompiler::Output interface.

* Fix problem with cpp-compiler on linux targets.

* Add shared library link error.

* Improving GCC/Clang parsing output.

* Make cpp compiler parsing function able to return a SlangResult.

* Handling for 'info' on clang

* Add expected result for c-compile-shared-library-error.c

* * Add flags such that link errors on shared libraries are supported.
* Added StringUtil::join

* Turn off the link shared library unfound symbol option on MacOS because it causes an error (and it's not needed on that target).

* Add natvis inclusion back to visual studio projects.

* Display message to try and determine crash problem on travisbuild.

* Fix bug in handling continuations for clang.
Disabled output of exception text.

* WIP: See what clang is outputting that is parsing incorrectly on travis.

* More handling for travis clang parsing issue.

* Restore natvis to core.vcxproj

* Fix visual studio project such that it still as natvis.
</content>
</entry>
<entry>
<title>Runtime Shared Library compilation and testing (#985)</title>
<updated>2019-06-14T22:05:12+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-06-14T22:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1fe24d3a74a9cd51c4a025cd0e78642f3e29df79'/>
<id>urn:sha1:1fe24d3a74a9cd51c4a025cd0e78642f3e29df79</id>
<content type='text'>
* Removed the need for VisualStudio specific CPPCompiler
Improved the version parsing for gcc/clang
Removed need for slang-unix-cpp-compiler-util.cpp/.h
Remove binary before compiling in the compile c tests

* Moved VisualStudio calcArgs into CPPCompilerUtil - as code is not windows specific.

* Set up compile time version for gcc and clang

* Fix compilation on OSX - use remove instead of unlink for file deletion.

* On OSX - clang uses different string format.

* Removed /bin/sh invoking as not required for OSX.

* First pass working testing with shared libraries.
</content>
</entry>
<entry>
<title>CPPCompiler improvements (#984)</title>
<updated>2019-06-14T16:20:12+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-06-14T16:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8c56d83506ef92b15b15bdb5969008dd69c8d2a6'/>
<id>urn:sha1:8c56d83506ef92b15b15bdb5969008dd69c8d2a6</id>
<content type='text'>
* Removed the need for VisualStudio specific CPPCompiler
Improved the version parsing for gcc/clang
Removed need for slang-unix-cpp-compiler-util.cpp/.h
Remove binary before compiling in the compile c tests

* Moved VisualStudio calcArgs into CPPCompilerUtil - as code is not windows specific.

* Set up compile time version for gcc and clang

* Fix compilation on OSX - use remove instead of unlink for file deletion.

* On OSX - clang uses different string format.

* Removed /bin/sh invoking as not required for OSX.
</content>
</entry>
<entry>
<title>Abstract CPPCompiler (#983)</title>
<updated>2019-06-14T14:02:04+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-06-14T14:02:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7461e95210e7420d0ddf681279813f394a6fd0d8'/>
<id>urn:sha1:7461e95210e7420d0ddf681279813f394a6fd0d8</id>
<content type='text'>
* Work in progress to be able to invoke VS from within code.

* First pass at windows version of refactor of OSProcessSpawner

* Closer to getting VS path lookup working.

* Make OSString assignable/ctor able

* Work out program files directory directly, so don't have to expand %%.

* WIP: Improve handling of process spawning.

* Add support for splitting input by line.

* * Correctly locates visual studio install
* Added functionality to invoke vs via cmd

* Add option to execute the command line.

* Handle in ProcessUtil for windows -&gt; WinHandle.

* Rename files slang-win-visual-studio-util.cpp/.h and slang-process-util.h

* First pass at unix/linux version of ProcessUtil.

* Fix reading Visual Studio path from the registry.

* Get compiling on linux with.

* Fix vcvarsall.bat name

* Use ProcessUtil to execute external code.

* Remove OSProcessSpawner.

* Remove includes for "os.h" where no longer needed.

* Fix tabbing issue in premake5.lua
Remove test code from slang-test-main.cpp

* Fix premake4.lua tabbing issue.

* Small fixes to slang-process-util.h
Init ExecuteResult on Win execute.

* Improve comments.

* Fix bug in StringUtil::calcLines - with oddly terminated source input being able to read past end.
Make slang-generate use StringUtil over it's own impl.

* Fix off by one bug in working out Visual Studio version.

* Fix bug in calculating Visual Studio Version

* Fix compilation on linux with string parameter being passed to messageFormat.

* Remove erroneous use of kOSError codes - use Result.

* First effort to generate standard compiler options.

* Initial efforts in compiling source code in test framework for VisualStudio.

* Testing compiling c code on VisualStudio on Windows.

* Fix warning on linux.

* Fix clang on linux warning (and therefore failing) returning a StringBuilder as String.

* Disable return-std-move on clang.

* CommandLine arguments are now tagged if they are escaped or not. That it is the clients responsibility to escape command lines that cannot be automatically escaped.

* Add checks on unix/linux that command line args are all unescaped.

* WIP getting runtime GCC to work.

* First pass compiler working on unix-like targets.

* Added File::remove function.

* Enable c-compile.c test on 'smoke'.

* WIP abstracting the CPP compiler concept.

* CPPCompilerSet and CPPCompilerUtil working on windows. Problem on unix.

* Used stdError for parsing of invoke of compiler to figure out verison.

* Removed some code that was no longer needed from slang-cpp-compiler.cpp
</content>
</entry>
</feed>
