| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
Add `findModifier` for `DeclReflection` so pattern like `extern struct
foo;` can be properly reflected.
Closes #8009
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #8112. ~~The issue asks for a "C layout", but in this PR I use
the term "CPU layout" because this naming was pre-existing in the
codebase as `kCPULayoutRulesImpl_`. The primary purpose of this layout
is to match CPU-side struct definitions with the shader side. I'm open
to better naming suggestions, though.~~
Edit: switched back to using `CDataLayout` & `-fvk-use-c-layout`, as the
CPU target depends on the object layout rules of existing CPU layout
rules, but they're incompatible with actual shaders. So a new
`kCLayoutRulesImpl_` was needed anyway.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Add reflection api for overload candidate filtering.
* Fix API.
* Fix.
* Update build.
* Update test.
* Update formatting.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functionality (#7067)
* Add link time array layout test
* Add link time constant array size compilation test
* Link time constant array size test
* Allow getting link time array size
Closes https://github.com/shader-slang/slang/issues/6753
* format
* Switch to SIMPLE test and check output
* Implement without binary api changes
* diagnose on link time constant sized array
* fix test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* image format json reflection
* format code
* use direct include
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Expose value of constant integers in module reflection
This commit adds `VariableReflection::getDefaultValueInt` to get the value of a variable if it is a compile-time constant integer.
TODO: currently it works only if the initializer expression is an integer literal, references to other constant values are not handled.
* Update VarDecl folded constant value during DeclBodyVisitor
Constant folding for integer values is already done internally by _validateCircularVarDefinition, this just reuses the result.
* Address review comments & formatting
* Formatting
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
| |
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Moved the pretty writer code from slang-reflection-test into core
* Moved reflection test code into the slang codebase and added the compiler option -reflection-json to store the reflection data in a separate file.
* Documented -reflection-json command line option
* moved PrettyWriter from core to compiler-core
* Fixed variable shadowing warning
* Use File::writeAllText instead of OSFilesystem and write to stdout if - is used as the path
* format code
* Fixed linker error
* Fix COM Ptr life time issues.
* Move enum to the end.
* Fix formatting.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
| |
* format
* Minor test fixes
* enable checking cpp format in ci
|
|
|
* Squash redundant move warnings
* Move C interface from slang.h to slang-deprecated.h
spGetBuildTagString remains, because it's useful to have before the
global session exists.
This C API is used quite pervasively in the C++ helpers (for example
slang::UserAttribute. It's not trivial to move these to
slang-deprecated.h as they're entangled with some enums which are
themselves used elsewhere in the compiler.
The fact that these helpers use the C API can be viewed as an
implementation detail for now, and this usage moved to slang-deprecated
in due course.
Closes https://github.com/shader-slang/slang/issues/4758
* Squash warnings for our usage of our deprecated API
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|