summaryrefslogtreecommitdiffstats
path: root/tools/glslang/glslang.cpp
Commit message (Collapse)AuthorAge
* Build a dynamic library for SlangTim Foley2017-07-19
| | | | | | | | | | | - Change the `slang` project from a static library to a dynamic one - Add some details around `slang.h` to make sure DLL export stuff is working - Make the `slangc` executable use the dynamic library - Rename the `glslang` sub-project to `slang-glslang` and move it into the main source hierarchy - This reflects the fact that it isn't a stand-alone tool, and isn't in any way a standard binary of glslang, but rather just an artifact of how Slang uses glslang
* Add a compile-time loop construct to SlangTim Foley2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The basic syntax is: $for(i in Range(0,99)) { /* stuff goes here */ } Note that the exact form is very restrictive. All that you are allowed to change is `i`, `0`, `99` or `/* stuff goes here */`. As a tiny bit of syntax sugar, the following should work: $for(i in Range(99)) { /* stuff goes here */ } Note that the range given is half-open (C++ iterator `[begin,end)` style). Both the beginning and end of the range must be compile-time constant expressions that Slang knows how to constant-fold. The implementation will basically generate code for `/* stuff goes here */` N times, once for each value in the half-open range. Each time, the variable `i` will be replaced with a different compile-time-constant expression. While I was working on a test case for this, I also found that our build of glslang had an issue with resource limits, so I fixed that. Clients will need to build a new glslang to use the fix.
* Don't use "auto locations" mode in glslangTim Foley2017-07-14
| | | | | | | | Fixes #88 The code was using `glslang::TShader::setAutoMapLocations` as a workaround for an old glslang issue, but apparently this mode has a bug where it ends up applying a `location` layout to the implicitly-created `gl_PerVertex` definition (which shouldn't be allowed). This change drops the call to `setAutoMapLocations` (and `setAutoMapBindings`) since it should no longer be required.
* Add support for dumping intermediates for debugging.Tim Foley2017-07-13
| | | | | | | | | | | | Calling: spSetDumpIntermedites(compileRequest, true); will set up a mode where Slang tries to dump every intermediate HLSL, GLSL, DXBC, SPIR-V, etc. file it generates. If SPIR-V or DXBC is requested then we also dump assembly of those. Right now the files are all named as `slang-<counter>.<ext>`, and get dropped in whatever the working directory is, but I'm open to ideas on how to improve that. Note: this change introduces a new binary interface to `glslang`, so pulling it requires an updated `glslang.dll`.
* Removed spGetTranslationUnitCode; Unified ↵Kai-Hwa Yao2017-07-10
| | | | EntryPointResult/TranslationUnitResult, added helper functionality; Ensure null termination when printing raw data
* Don't assume vector contains contentsKai-Hwa Yao2017-07-10
|
* Allow glslang wrapper to output regular SPIRV before disassemblyKai-Hwa Yao2017-07-10
|
* Initial import of code.Tim Foley2017-06-09