<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/core/slang-downstream-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>2021-04-01T17:39:11+00:00</updated>
<entry>
<title>Added compiler-core project (#1775)</title>
<updated>2021-04-01T17:39:11+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2021-04-01T17:39:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=fa31d21ba92669a521a7768467246918e3947e02'/>
<id>urn:sha1:fa31d21ba92669a521a7768467246918e3947e02</id>
<content type='text'>
* #include an absolute path didn't work - because paths were taken to always be relative.

* Split out compiler-core initially with just slang-source-loc.cpp

* More lexer, name, token to compiler-core.

* Split Lexer and Core diagnostics.

* Move slang-file-system to core.

* Add slang-file-system to core.

* More DownstreamCompiler into compiler-core

* Fix typo.

* Add compiler-core to bootstrap proj.

* Small fixes to premake

* For linux try with compiler-core

* Remove compiler-core from examples.

* Added NameConventionUtil to compiler-core

* Add global function to CharUtil to *hopefully* avoid linking issue.

* Hack to make linkage of CharUtil work on linux.</content>
</entry>
<entry>
<title>DownstreamDiagnostic::Type -&gt; Severity (#1687)</title>
<updated>2021-02-04T19:23:32+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2021-02-04T19:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7f266f1ea7a51213069282296a905650fd405c3f'/>
<id>urn:sha1:7f266f1ea7a51213069282296a905650fd405c3f</id>
<content type='text'>
* #include an absolute path didn't work - because paths were taken to always be relative.

* WIP diagnostics for line number output.

* Small param naming change

* Use x macro for pass through compile human name lookup/getting.

* WIP on parsing downstream compiler output.

* Split out parsing into ParseDiagnosticUtil.
Added test result of single line.

* Dump out the std output on fail to parse diagnostics.

* Change test type for syntax-error-intrinsic.slang be TEST not TEST_DIAGNOSTIC

* Use Index for StringUtil.

* WIP: First pass support for parsing Slang diagnostics.

* WIP Testing comparing with ParseDiagnosticUtil with previous ad-hoc mechanism.

* Use the new parsing mechanism for diagnostic comparisons.

* Improvements to diagnostics parsing.
Better error handling, and fallback handling.
Added ability to parse downstream compilers without a prefix.
Added ability to parse Slang with a prefix.

* DownstreamDiagnostic::Type -&gt; Severity and related fixes.

* Small fixes around moving from DownstreamDiagnostic::Type -&gt; Severity

* Small comment fixes.

Co-authored-by: Tim Foley &lt;tfoleyNV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Diagnostic comparison using parsing (#1683)</title>
<updated>2021-02-03T21:31:58+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2021-02-03T21:31:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4c66c17b2e5572c95da260ea4761f5804eb52853'/>
<id>urn:sha1:4c66c17b2e5572c95da260ea4761f5804eb52853</id>
<content type='text'>
* #include an absolute path didn't work - because paths were taken to always be relative.

* WIP diagnostics for line number output.

* Small param naming change

* Use x macro for pass through compile human name lookup/getting.

* WIP on parsing downstream compiler output.

* Split out parsing into ParseDiagnosticUtil.
Added test result of single line.

* Dump out the std output on fail to parse diagnostics.

* Change test type for syntax-error-intrinsic.slang be TEST not TEST_DIAGNOSTIC

* Use Index for StringUtil.

* WIP: First pass support for parsing Slang diagnostics.

* WIP Testing comparing with ParseDiagnosticUtil with previous ad-hoc mechanism.

* Use the new parsing mechanism for diagnostic comparisons.

* Improvements to diagnostics parsing.
Better error handling, and fallback handling.
Added ability to parse downstream compilers without a prefix.
Added ability to parse Slang with a prefix.</content>
</entry>
<entry>
<title>Improvements around hashing (#1355)</title>
<updated>2020-05-26T17:53:10+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2020-05-26T17:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b1369040c3d6d6a8704bdb17d9de99f36a108e07'/>
<id>urn:sha1:b1369040c3d6d6a8704bdb17d9de99f36a108e07</id>
<content type='text'>
* Fields from upper to lower case in slang-ast-decl.h

* Lower camel field names in slang-ast-stmt.h

* Fix fields in slang-ast-expr.h

* slang-ast-type.h make fields lowerCamel.

* slang-ast-base.h members functions lowerCamel.

* Method names in slang-ast-type.h to lowerCamel.

* GetCanonicalType -&gt; getCanonicalType

* Substitute -&gt; substitute

* Equals -&gt; equals
ToString -&gt; toString

* ParentDecl -&gt; parentDecl
Members -&gt; members

* * Make hash code types explicit
* Use HashCode as return type of GetHashCode
* Added conversion from double to int64_t
* Split Stable from other hash functions

* toHash32/64 to convert a HashCode to the other styles.
GetHashCode32/64 -&gt; getHashCode32/64
GetStableHashCode32/64 -&gt; getStableHashCode32/64

* Other Get/Stable/HashCode32/64 fixes

* GetHashCode -&gt; getHashCode

* Equals -&gt; equals

* CreateCanonicalType -&gt; createCanonicalType

* Catches of polymorphic types should be through references otherwise slicing can occur.

* Fixes for newer verison of gcc.
Fix hashing problem on gcc for Dictionary.

* Another fix for GetHashPos

* Fix signed issue around GetHashPos</content>
</entry>
<entry>
<title>Initial work to support OptiX output for ray tracing shaders (#1307)</title>
<updated>2020-04-08T20:57:24+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2020-04-08T20:57:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6274e175a2b6a07f448feadd4d7da35b2784d746'/>
<id>urn:sha1:6274e175a2b6a07f448feadd4d7da35b2784d746</id>
<content type='text'>
* Initial work to support OptiX output for ray tracing shaders

This change represents in-progress work toward allowing Slang/HLSL ray-tracing shaders to be cross-compiled for execution on top of OptiX. The work as it exists here is incomplete, but the changes are incremental and should not disturb existing supported use cases.

One major unresolved issue in this work is that the OptiX SDK does not appear to set an environment variable

Changes include:

* Modified the premake script to support new options for adding OptiX to the build. Right now the default path to the OptiX SDK is hard-coded because the installer doesn't seem to set an environment variable. We will want to update that to have a reasonable default path for both Windows and Unix-y platforms in a later chance.

* I ran the premake generator on the project since I added new options, which resulted in a bunch of diffs to the Visual Studio project files that are unrelated to this change. Many of the diffs come from previous edits that added files using only the Visual Studio IDE rather than by re-running premake, so it is arguably better to have the checked-in project files more accurately reflect the generated files used for CI builds.

* The "downstream compiler" abstraction was extended to have an explicit notion of the kind of pipeline that shaders are being compiled for (e.g., compute vs. rasterization vs. ray tracing). This option is used to tell the NVRTC case when it needs to include the OptiX SDK headers in the search path for shader compilation (and also when it should add a `#define` to make the prelude pull in OptiX). This code again uses a hard-coded default path for the OptiX SDK; we will need to modify that to have a better discovery approach and also to support an API or command-line override.

  * One note for the future is that instead of passing down a "pipeline type" we could instead pass down the list/set of stages for the kernels being compiled, and the OptiX support could be enabled whenever there is *any* ray tracing entry point present in a module. That approach would allow mixing RT and compute kernels during downstream compilation. We will need to revisit these choices when we start supporting code generation for multiple entry points at a time.

* The CUDA emit logic is currently mostly unchanged. The biggest difference is that when emitting a ray-tracing entry point we prefix the name of the generated `__global__` function with a marker for its stage type, as required by the OptiX runtime (e.g., a `__raygen__` prefix is required on all ray-generation entry points).

* The `Renderer` abstraction had a bare minimum of changes made to be able to understand that ray-tracing pipelines exist, and also that some APIs will require the name of each entry point along with its binary data in order to create a program.

* The `ShaderCompileRequest` type was updated so that only a single "source" is supported (rather than distinct source for each entry point), and also the entry points have been turned into a single list where each entry identifies its stage instead of a fixed list of fields for the supported entry-point types.

* The CUDA compute path had a lot of code added to support execution for the new ray-tracing pipeline type. The logic is mostly derived from the `optixHello` example in the OptiX SDK, and at present only supports running a single ray-generation shader with no parameters. The code here is not intended to be ready for use, but represents a signficiant amount of learning-by-doing.

* The `slang-support.cpp` file in `render-test` was updated so that instead of having separate compilation logic for compute vs. rasterization shaders (which would mean adding a third path for ray tracing), there is now a single flow to the code that works for all pipeline types and any kind of entry points.

  * Implicit in the new code is dropping support for the way GLSL was being compiled for pass-through render tests, which means pass-through GLSL render tests will no longer work. It seems like we didn't have any of those to begin with, though, so it is no great loss.

  * Also implicit are some new invariants about how shaders without known/default entry points need to be handled. For example, the ray tracing case intentionally does not fill in entry points on the `ShaderCompileRequest` and instead fully relies on the Slang compiler's support for discovering and enumerating entry points via reflection. As a consequence of those edits the `-no-default-entry-point` flag on `render-test` is probably not working, but it seems like we don't have any test cases that use that flag anyway.

Given the seemingly breaking changes in those last two bullets, I was surprised to find that all our current tests seem to pass with this change. If there are things that I'm missing, I hope they will come up in review.

* fixup: issues from review and CI

* Some issues noted during the review process (e.g., a missing `break`)

* Fix logic for render tests with `-no-default-entry-point`. I had somehow missed that we had tests reliant on that flag. This required a bit of refactoring to pass down the relevant flag (luckily the function in question was already being passed most of what was in `Options`, so that just passing that in directly actually simplifies the call sites a bit.

* There was a missing line of code to actually add the default compute entry points to the compile request. I think this was a problem that slipped in as part of some pre-PR refactoring/cleanup changes that I failed to re-test.</content>
</entry>
<entry>
<title>CUDA version handling (#1301)</title>
<updated>2020-03-30T23:23:09+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2020-03-30T23:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ea7690558bca71ce3a9453adff4e0135352a352f'/>
<id>urn:sha1:ea7690558bca71ce3a9453adff4e0135352a352f</id>
<content type='text'>
* render feature for CUDA compute model.

* Use SemanticVersion type.

* Enable CUDA wave tests that require CUDA SM 7.0.
Provide mechanism for DownstreamCompiler to specify version numbers.

* Enabled wave-equality.slang

* Make CUDA SM version major version not just a single digit.

* Fix assert.

* DownstreamCompiler::Version -&gt; CapabilityVersion</content>
</entry>
<entry>
<title>CUDA/C++ backend improvements  (#1198)</title>
<updated>2020-02-04T20:19:48+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2020-02-04T20:19:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=17c6c6044965629a3ae7e8ef004cc0b2ca657c55'/>
<id>urn:sha1:17c6c6044965629a3ae7e8ef004cc0b2ca657c55</id>
<content type='text'>
* WIP with vector float test.

* vector-float test working.

* Fixed remaing tests broken with init changes.

* Improve 64bit-type-support.md

* Disable tests broken on CI system for Dx.

* WIP: Make type available for comparison.

* Moved type conversion into TypeTextUtil.

* Add text/type conversions from DownstreamCompiler to TypeTextUtil.

* Allow compaison taking into account type.

* Removed quantize in vector-float.slang test.
</content>
</entry>
<entry>
<title>WIP CUDA source emit (#1157)</title>
<updated>2019-12-19T16:23:14+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-12-19T16:23:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e3fe0319467546bae070137c58dcf8f9fbe93c79'/>
<id>urn:sha1:e3fe0319467546bae070137c58dcf8f9fbe93c79</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.

* WIP support for nvrtc.

* WIP: Adding support for nvrtc compiler.
Adding enum types, wiring up the nvrtc into slang.

* Fix remaining CPPCompiler references.

* Fix order issue on target string matching.

* Use ISlangSharedLibrary for nvrtc.

* Use DownstreamCompiler for nvrtc.

* WIP first pass at compilation win nvrtc.

* Added testing if file is on file system into CommandLineDownstreamCompiler.
Added sourceContentsPath.

* Make test cuda-compile.cu work by just compiling not comparing output.

* Genearlize DownstreamCompiler usage.

* Fix warning on clang.

* Remove CompilerType from DownstreamCompiler.

* Use DownstreamCompiler interface for all compilers.

NOTE for FXC, DXC and GLSLANG this doesn't mean using 'compile' - it's still extracting functions from shared library.

* Replace DownstreamCompiler::SourceType -&gt; SlangSourceLanguage

* Replace _canCompile with something data driven.

* Fix compiling on gcc/clang for DownstreamCompiler.

* Moved some text conversions into DownstreamCompiler.

* Fix problem on non-vc builds with not having return on locateCompilers for VS.

* Change so no warning for code not reachable on locateCompilers for vs.

* WIP: CUDA code generation - currently just using CPU layout and HLSL.

* emitXXXForEntryPoint -&gt; emitEntryPointSource
emitSourceForEntryPoint -&gt; emitEntryPointSourceFromIR
Fix up generating cuda to get PTX.

* WIP emitting cuda for IR.

* Small improvements to CUDA ouput.

* Disable the CUDA emit test, as output not currently compilable.
</content>
</entry>
<entry>
<title>Feature/source downstream compiler (#1153)</title>
<updated>2019-12-12T21:14:27+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-12-12T21:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a2d4d447639a1860f9de4ba9e2435f1d40ff3669'/>
<id>urn:sha1:a2d4d447639a1860f9de4ba9e2435f1d40ff3669</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.

* WIP support for nvrtc.

* WIP: Adding support for nvrtc compiler.
Adding enum types, wiring up the nvrtc into slang.

* Fix remaining CPPCompiler references.

* Fix order issue on target string matching.

* Use ISlangSharedLibrary for nvrtc.

* Use DownstreamCompiler for nvrtc.

* WIP first pass at compilation win nvrtc.

* Added testing if file is on file system into CommandLineDownstreamCompiler.
Added sourceContentsPath.

* Make test cuda-compile.cu work by just compiling not comparing output.

* Genearlize DownstreamCompiler usage.

* Fix warning on clang.

* Remove CompilerType from DownstreamCompiler.

* Use DownstreamCompiler interface for all compilers.

NOTE for FXC, DXC and GLSLANG this doesn't mean using 'compile' - it's still extracting functions from shared library.

* Replace DownstreamCompiler::SourceType -&gt; SlangSourceLanguage

* Replace _canCompile with something data driven.

* Fix compiling on gcc/clang for DownstreamCompiler.

* Moved some text conversions into DownstreamCompiler.

* Fix problem on non-vc builds with not having return on locateCompilers for VS.

* Change so no warning for code not reachable on locateCompilers for vs.
</content>
</entry>
<entry>
<title>Use DownstreamCompiler for all downstream compilers (#1152)</title>
<updated>2019-12-12T19:53:44+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2019-12-12T19:53:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=15335549340c54fd7b89b28104ddc907e9c64638'/>
<id>urn:sha1:15335549340c54fd7b89b28104ddc907e9c64638</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.

* WIP support for nvrtc.

* WIP: Adding support for nvrtc compiler.
Adding enum types, wiring up the nvrtc into slang.

* Fix remaining CPPCompiler references.

* Fix order issue on target string matching.

* Use ISlangSharedLibrary for nvrtc.

* Use DownstreamCompiler for nvrtc.

* WIP first pass at compilation win nvrtc.

* Added testing if file is on file system into CommandLineDownstreamCompiler.
Added sourceContentsPath.

* Make test cuda-compile.cu work by just compiling not comparing output.

* Genearlize DownstreamCompiler usage.

* Fix warning on clang.

* Remove CompilerType from DownstreamCompiler.

* Use DownstreamCompiler interface for all compilers.

NOTE for FXC, DXC and GLSLANG this doesn't mean using 'compile' - it's still extracting functions from shared library.

* Fix compiling on gcc/clang for DownstreamCompiler.

* Fix problem on non-vc builds with not having return on locateCompilers for VS.

* Change so no warning for code not reachable on locateCompilers for vs.
</content>
</entry>
</feed>
