diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-07-21 11:52:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-21 11:52:17 -0700 |
| commit | 3fa85ede1a6d532b0e86c8b71d3f37d30c353aad (patch) | |
| tree | dff607d1927c037f44a6a6fbbf2847f3944f5061 /slang.h | |
| parent | 85f60e07507f347ef4cb613b6d87521ff10e6c81 (diff) | |
| parent | 9718ab32e91ba632b03ad8d0f5e89a597b225a4c (diff) | |
Merge pull request #132 from tfoleyNV/line-directive-control
Add an API option to control emission of `#line` directives
Diffstat (limited to 'slang.h')
| -rw-r--r-- | slang.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -96,6 +96,18 @@ extern "C" SLANG_COMPILE_FLAG_NO_CHECKING = 1 << 0, /**< Disable semantic checking as much as possible. */ }; + /*! + @brief Options to control emission of `#line` directives + */ + typedef unsigned int SlangLineDirectiveMode; + enum + { + SLANG_LINE_DIRECTIVE_MODE_DEFAULT = 0, /**< Default behavior: pick behavior base on target. */ + SLANG_LINE_DIRECTIVE_MODE_NONE, /**< Don't emit line directives at all. */ + SLANG_LINE_DIRECTIVE_MODE_STANDARD, /**< Emit standard C-style `#line` directives. */ + SLANG_LINE_DIRECTIVE_MODE_GLSL, /**< Emit GLSL-style directives with file *number* instead of name */ + }; + typedef int SlangSourceLanguage; enum { @@ -177,6 +189,13 @@ extern "C" int enable); /*! + @brief Set whether (and how) `#line` directives hsould be output. + */ + SLANG_API void spSetLineDirectiveMode( + SlangCompileRequest* request, + SlangLineDirectiveMode mode); + + /*! @brief Sets the target for code generation. @param ctx The compilation context. @param target The code generation target. Possible values are: |
