summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2025-01-30Support cooperative vector including Vulkan-Header (#6228)Jay Kwak
* Support cooperative vector including Vulkan-Header Adding a Slang support for cooperative vector with vulkan-header update.
2025-01-30Support cooperative vector (#6223)Jay Kwak
* Support cooperative vector without Vulkan-header update Adding a Slang support for cooperative vector. But this commit doesn't have Vulkan-header update.
2025-01-28Fix geometry shader related modifier lowering. (#6197)Yong He
* Fix geometry shader related modifier lowering. * Cleanup. * Delete obselete test. * Enable geometryShader test on windows only. * Fix test.
2025-01-28Add a unit test to cover type-conformance compilation API. (#6178)Yong He
Co-authored-by: Anders Leino <aleino@nvidia.com>
2025-01-24Fix static build and install (#6158)Dario Mylonopoulos
* Add SLANG_ENABLE_RELEASE_LTO cmake option * Fix cmake static build * Disable install SlangTargets to avoid static build failing
2025-01-22Cache and reuse glsl module. (#6152)Yong He
* Cache and reuse glsl module. * Fix. * Implement record/replay for the new api. * Fix record replay. * Fix test.
2025-01-17test-server should use d3d12core.dll from bin directory (#6095)Jay Kwak
2025-01-17Add groupshared atomic array test. (#6107)Yong He
* Add groupshared atomic array test. * Fix test.
2025-01-17Avoid using the backend validation when using test server (#6094)Jay Kwak
* Avoid using the backend validation when using test server Currently with a debug build, the backend validation such as Vulkan-Validation-Layer or DXC validation is enabled all the time. It means there is a higher chance that we see warning messages while running slang-test with a debug build. However, those warning messages incorrectly treated as the testing result when using test-server. This is mainly because of the fact that the Slang implemention for the RPC commucation expects only one time output result. As soon as any warning is printed, the testing process is incorrectly considered as completed even though it might be still in the middle of initializing the device. This commit disables the backend validation when using the test-server. * format code (#31) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-15Fix argument buffer tier2 layout computation. (#6101)Yong He
2025-01-08slang-test: Ensure runtime is consistent (#6021)Anders Leino
I hit issue #5305 again after re-generating the build directory, building and then running slang-test. In other words, D3D12 and Slang-RHI/WebGPU/D3D12 failed to create a device due to the runtime being incosistent. Bilding copy-prebuilt-binaries fixed it, and so it's best to make this step a dependency of slang-test.
2025-01-07Add backtraces to examples (#5973)Anders Leino
* examples: Log stack trace on exceptions For now, this is only implemented on Windows. This helps to address #5520. * examples: Print log file if there is any * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-07Lower varying parameters as pointers instead of SSA values. (#5919)Yong He
* Add executable test on matrix-typed vertex input. * Fix emit logic of matrix layout qualifier. * Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.
2025-01-07Fix some robustness issues in the examples (#5984)Anders Leino
* examples: Make hello-world example exit gracefully if VK cannot be initialized - Check if VK API function pointers are valid before using them - Return 0 and exit if VK initialization fails - Enable hello-world example * examples: Fixes for ray-tracing examples - Assert that accelleration structure buffer is not nullptr - Check if buffer creation succeeded before proceeding - This makes initialization not hang, but it still fails. Therefore, the test expectations are just updated to point to another issue. - Enable ray-tracing tests on Windows
2025-01-06Properly set D3D12SDKPath (#5993)Jay Kwak
* Properly set D3D12SDKPath Closes https://github.com/shader-slang/slang/issues/5992 This commit have an effect on slang-test.exe and test-server.exe. When we run slang-test.exe, it uses D3D12Core.DLL located at `build/{Release,Debug}/bin/D3D12`, which is `D3D12` from where the executable file is located at. This has been working fine but we found a case where it doesn't work properly. This commit sets D3D12SDKPath value explicitly to avoid potential problems.
2025-01-03Create DirectDeclRef when creating Decl to prevent invalid dedup. (#5945)Yong He
* Create DirectDeclRef when creating Decl to prevent invalid dedup. * Fix test. * fix * update slang-rhi
2025-01-03Fix parameter location reflection for pure data paramblocks. (#5956)Yong He
2025-01-01Allow explicit test root (#5980)bspeice
2024-12-26Support dispatchComputeIndirect and draw(Indexed)Indirect with count buffer ↵AdamYuan
for Vulkan (#5929) * Support gfx ComputeCommandEncoder::dispatchComputeIndirect for Vulkan * Support count buffer for Vulkan in gfx RenderCommandEncoder::drawIndirect and RenderCommandEncoder::drawIndexedIndirect * Fix an unintended change * Fix format issue --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-18Fix metadata of register space and varying params. (#5906)Yong He
2024-12-17Support specializing generic entrypoints in `findAndCheckEntryPoint`. (#5890)Yong He
2024-12-17Fix entrypoint auto discovery logic. (#5885)Yong He
* Fix entrypoint auto discovery logic. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-12-18Fix `getArgumentValueFloat` when arg is int. (#5888)Yong He
* Fix `getArgumentValueFloat` when arg is int. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-12-11Fix attribute reflection. (#5823)Yong He
* Fix attribute reflection. * Fix. * Fix.
2024-12-10A small mistake. (#5819)HappyLi3
The 'samplerInfo.magFilter' should match the 'desc.magFilter'. Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-10Fix a crash when search for files. (#5818)Yong He
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-09Allow pointers to existential values. (#5793)Yong He
* Fix pointer offset logic and add executable tests. * Fix. * Fix test. * Add existential ptr test. * Allow pointers to existential values. * Fix. * Fix. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-09Fix reflection for pointer element types. (#5797)Yong He
* Fix reflection for pointer element types. * Fix. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-05Remove duplicate call to install() for libslang (#5767)Ellie Hermaszewska
Closes https://github.com/shader-slang/slang/issues/5764 Also mention other installed targets in cmake config
2024-12-02Move c++ parsing code from slang-cpp-extractor to static library (#5675)Lauro Oyen
* Move c++ parsing code from slang-cpp-extractor to static library * Format code * Remove relative includes --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com>
2024-11-25Fix issue with slang-embed & include ordering (#5680)Sai Praveen Bangaru
* Fix issue with slang-embed & include ordering * Update CMakeLists.txt
2024-11-21Enable some rendering tests (#5623)Anders Leino
* render-test: Add copy-source usage for render targets I found that Slang-RHI/WGPU was not able to copy from render targets to staging buffers. This helps to address issue #4943. * Add entries to render API util infos Entries for glsl-cross and glsl-rewrite are added. Without glsl-cross, slang-test fails to select a back-end, and winds up crashing when tests/render/cross-compile-entry-point.slang is enabled tests/render/cross-compile0.hlsl fails similarly without glsl-rewrite. * Enable some rendering tests * Add expected test outputs
2024-11-20Change how DeclRef::toText works (#5592)Sai Praveen Bangaru
* Change how DeclRef::toText works We now ignore the decl-ref heirarchy since that only includes nodes with specialization info & simply walk up the tree of decls, while emitting any specializations present in the decl-ref. * Update some tests. Add cases for direct refs to generic params & Lookup decl refs
2024-11-15Embed core module in wasm build. (#5569)Yong He
* Embed core module in wasm build. * format code * add uintptr_t case. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-11-14[slang-rhi] pass encoders (#5559)Simon Kallweit
* use pass encoder api * update slang-rhi
2024-11-13Correct include dir for libslang (#5539)Ellie Hermaszewska
This stops adding the repo root to the include path for anything linking with slang. This enabled a bunch of convenient includes, but might lead to confusing behavior for anyone including slang. Not to mention differences including it from an install vs source. Co-authored-by: Yong He <yonghe@outlook.com>
2024-11-13Various fixes to enable some WGSL graphics tests (#5548)Anders Leino
* Update Slang-RHI to get WGPU backend fixes * render-test: Use device local memory type for vertex buffers This helps to avoid https://github.com/shader-slang/slang-rhi/issues/104 * Fix bug in WGSL emitter layout code. There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not being used. This patch enables a bunch of tests for WGPU. This helps to address issue #4943. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-11-11Reflection compiler option (#5507)tareksander
* 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>
2024-11-11[slang-rhi] refactor command encoding (#5487)Simon Kallweit
* update render test to use new slang-rhi API * update slang-rhi --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-11-08Fix EHa flag compiler filtering (#5524)cheneym2
The previous attempt to enable Structured Exception Handling in (only) MSVC using the /EHa compiler flag caused trouble with flags defined with Cmake Generator Expressions. These expressions are not fully resolved, and they fail validation checks in check_cxx_compiler_flag(). The previous attempt at applying /EHa to only MVSC involved refactoring a direct call to target_compile_options() with a call to the Slang helper function add_supported_cxx_flags() where an additional MSVC filter was introduced, but the helper also calls check_cxx_compiler_flag() to see if flags are supported. It was okay for /EHa, but not some other flags that ended up getting newly validated. The above issue is fixed by re-implementing the change that added /EHa to only MSVC. This change goes back to adding compiler flags without the helper function with its extra validation, instead using an additional cmake generator expression to apply /EHa only to MSVC.
2024-11-05Catch all exceptions in render-test (#5495)cheneym2
Catch all exceptions in render-test In MSVC, the /EHsc flag is used by default, it causes only C++ (synchronous) exceptions to be caught by try/catch blocks. The /EHa flag can instead be used to catch both synchronous C++ exceptions as well as structured asynchronous exceptions such as those seen in segfaults or other typical bugs. Using /EHa allows render-test to not crash completely if there is a buggy graphics driver in the system. Issue 5275
2024-11-05Update slang-rhi and fix error handling (#5485)cheneym2
Update slang-rhi to pick up a fix in webgpu compilation error handling. In doRenderComparisonTestRun(), only return TestResult::Pass if the shader is ran actually compiled. A similar check is in place elsewhere in slang-test-main, but was missed in doRenderComparisonTestRun(). Add two tests to the github CI skiplist, and use the skiplist in one additional CI config that was running without it. Closes 5291
2024-11-05Move switch statement bodies to their own lines (#5493)Ellie Hermaszewska
* Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-10-29formatEllie Hermaszewska
* format * Minor test fixes * enable checking cpp format in ci
2024-10-29preparation for clang format (#5422)Ellie Hermaszewska
* Clang-format excludes * Add .clang-format * Don't clang-format in external * Missing includes and forward declarations * Replace wonky include-once macro name * neaten include naming * Add clang-format to formatting script * Add xargs and diff to required binaries * add clang-format to ci formatting check * Add max version check to formatting script * temporarily disable checking formatting for cpp files
2024-10-29format cmake files (#5406)Ellie Hermaszewska
* format cmake files * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-10-25Replace stdlib with core-module on files and projects (#5411)Jay Kwak
This commit renames the files and projects to prefer "core-module" over "stdlib". The directory name `source/slang-stdlib` needs to be renamed too, and there will be another commit for it soon.
2024-10-25Replace stdlib on Slang API with CoreModule (#5405)Jay Kwak
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them. Following functions are renamed: compileStdLib() -> compileCoreModule() loadStdLib() -> loadCoreModule() saveStdLib() -> saveCoreModule() slang_createGlobalSessionWithoutStdLib() -> slang_createGlobalSessionWithoutCoreModule() slang_getEmbeddedStdLib() -> slang_getEmbeddedCoreModule() hasDeferredStdLib() -> hasDeferredCoreModule() Following command-line arguments are renamed: "-load-stdlib" -> "-load-core-module" "-save-stdlib" -> "-save-core-module" "-save-stdlib-bin-source" -> "-save-core-module-bin-source" "-compile-stdlib" -> "-compile-core-module"
2024-10-24declutter top level CMakeLists.txt (#5391)Ellie Hermaszewska
* Split examples cmake desc * declutter top level CMakeLists.txt * fail if building tests without gfx * Move llvm fetching to another cmake file * Further split CMakeLists.txt * Neaten llvm fetching * Remove last premake remnant * correct cross builds * Neaten * Neaten project organization in vs
2024-10-23Fix several bugs with `specializeWithArgTypes()` (#5365)Sai Praveen Bangaru
* Fix several bugs with `specializeWithArgTypes()` * Make all types L-values for the purposes of reflection API resolution