summaryrefslogtreecommitdiffstats
path: root/external
Commit message (Collapse)AuthorAge
* Update build to allow setting external mimalloc path (#8676)Lujin Wang2025-10-11
| | | | Update the build to allow setting user-specific path for the external module mimalloc.
* Rename some symbols related to pointers types (#8592)Theresa Foley2025-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that while this change touched a large numer of files, there are no changes to functionality being made here. The only things being done are renaming various symbols and, in a few cases, updating or adding comments for consistency with the new names. The core of the naming changes are: * Most things named to refer to `OutType` (e.g., `IROutType`, `IRBuilder::getOutType()`, etc.) have been consistently renamed to refer to `OutParamType`, to emphasize that the relevant AST/IR node types are only intended for use to represent `out` parameters. * The same change as described above for `OutType` is also made for `RefType`, which becomes `RefParamType` in most cases. One mess that this exposes is the way that the `ExplicitRef<T>` type in the core module currently lowers to `IRRefParamType`. This change sticks to the rule of not making functional changes, so that mess is left as-is for now. * Names referring to `InOutType` have been changed to instead refer to `BorrowInOutType`. The intention with this naming change is to emphasize that the Slang rules for `inout` are semantically those of a borrow (or at least our interpretation of what a borrow means). * Names referring to `ConstRefType` have been changed to instead refer to `BorrowInType`. This change starts work on clarifying that the existing `__constref` modifier was never intended to be a read-only analogue of `__ref`, and instead is the input-only analogue of `inout`. * The `ParameterDirection` enum type has been changed to `ParamPassingMode`, to reflect the fact that the concept of "direction" fails to capture what is actually being encoded, particularly once we have modes beyond simple `in`/`out`/`inout`. While this change does not alter behavior in any case (the user-exposed Slang language is unchanged), it is intended to set up subsequence changes that will work to make the handling of these types in the compiler more nuanced and correct. Breaking this part of the change out separately is primarily motivated by a desire to minimize the effort for reviewers. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Update SPIRV-Tools and SPIRV-Headers to latest versions (#8565)Harsh Aggarwal (NVIDIA)2025-10-01
|
* Prepare VulkanSDK release Oct 2025 (#8525)Jay Kwak2025-09-25
| | | | Related to - https://github.com/shader-slang/slang/issues/8519
* Fix SPIRV headers precedence (#8481)Jay Kwak2025-09-19
| | | | | | | | | | Remove SYSTEM flag from SPIRV-Headers to fix MacOS header precedence. When the path is registered as SYSTEM, it is used with `-isystem` option not `-I` option and it gets less searching order on MacOS. When spirv.h is installed on the system directory, it will end up using the system installed spirv.h, which is most likely an older version than we should use.
* Set default mimalloc for spirv-tools but allow user to override (#8460)Gangzheng Tong2025-09-17
| | | | | | | | | | | | | | | | | | | | | | | | This PR resolves a configuration conflict where the SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC option was defined twice with different defaults, causing user settings to be overridden. Changes: - Removed duplicate definition in external/CMakeLists.txt that only applied to WIN32 - Define default in main CMakeLists.txt - ON by default for Windows - OFF by default for other platforms (still need to resolve crashes so set it to `OFF` for now) Preserved user configuration - explicit -DSLANG_ENABLE_SPIRV_TOOLS_MIMALLOC=value settings are now properly respected Related to https://github.com/shader-slang/slang/issues/8158 --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Added __magic_enum (#8436)Ronan2025-09-17
| | | | | | | | | | | | | | | | | | | | | Fixes #8406 (and #8410). `AddressSpace`, `MemoryScope` and `AccessQualifier` are no longer `BaseType`. I added a new `__magic_enum` (very similar to `__magic_type`) syntax to be able to easily create values or these enums from the compiler. (I don't know if it was the right way to do it, but it works and the changes are small enough?). I had a weird bug: `tests/language-feature/capability/address-of.slang` was failing in `IRBuilder::_findOrEmitConstant(IRConstant& keyInst)`. When needing a new `u64(0)`, it did not find it in the `ConstantMap` first, but then failed to add it right after because it already existed in the map! But this was triggered by `IRPtrType* IRBuilder::getPtrType(IROp op, IRType* valueType, AccessQualifier accessQualifier, AddressSpace addressSpace)`, which is a strange coincidence... but I could not find the issue in what I did. I ended up bumping unordered_dense, and it solved the issue (so there was a bug in there).
* Enable static mimalloc in Spriv-Tools (#8419)Gangzheng Tong2025-09-16
| | | | | | | | | | | | | | | | | | | | | | * Added optional mimalloc integration for SPIRV-Tools to improve compilation performance * Cloning `mimalloc` repo to external/ on demand during cmake config * Enabled by default on Windows, configurable via `SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC` CMake option, to enable static mimalloc build in spirv-tools. * There are some crashes in Linux and Mac with static mimalloc enabled, likely due to the system malloc and mimalloc mixed usage. This might be expected as mimalloc in spirv-tools is not extensively tested according to https://github.com/KhronosGroup/SPIRV-Tools?tab=readme-ov-file#dependency-on-mimalloc. So by default only Windows has this enabled. Close: https://github.com/shader-slang/slang/issues/8158 --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Update SPIRV-{Tools,Headers} (#8415)Jay Kwak2025-09-10
| | | | | | | | | This updates SPIRV submodules. Unfortunately we cannot use the latest because one of PRs in SPIRV-Tools causes VVL errors on our slang-tests. The issue is tracked in - https://github.com/KhronosGroup/SPIRV-Tools/issues/6316 - https://github.com/shader-slang/slang/issues/8414 This PR also updates/simplifies the document of updating SPIRV process.
* Enable slangpy and slang-rhi tests for Mac (#8297)Gangzheng Tong2025-08-29
| | | | | | | | | | | | | | | | | This PR enables slang-rhi and slangpy tests in the slang CI for MacOS. * exclude the slang-rhi `sampler-array` test for mac; issue tracked in https://github.com/shader-slang/slang/issues/8246 * update slang-rhi for fix of `nested-parameter-block-2` * for slangpy test, install the required python package in the github mac runner only each CI run. Closes: https://github.com/shader-slang/slang/issues/7330 --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Fix warnings from CMake version 3.31 (#8227)Sam Estep2025-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake 3.31 (released [last November](https://www.kitware.com/cmake-3-31-0-available-for-download/)) deprecated compatibility with CMake versions older than 3.10, causing warnings when running commands like `cmake --preset default` in the Slang repo: ``` CMake Deprecation Warning at external/miniz/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. CMake Deprecation Warning at external/lz4/build/cmake/CMakeLists.txt:13 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. ``` Those dependencies modified their `cmake_minimum_required` calls in lz4/lz4#1601 and richgel999/miniz#344 respectively to fix those warnings, so this PR bumps them both to include those changes. Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
* Add more system dependency options to CMake (#7987)Niklas Korz2025-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | Allows opt-in for sourcing the following dependencies from the system, instead of using the vendored ones: - miniz - lz4 - vulkan-headers - spirv-tools - glslang (some of these already had options that weren't working, as either it expected them to be static libraries or it was expecting to be embedded in another CMakeList that should provide the package, instead of finding the package itself) This is based on a patch we currently maintain inside nixpkgs, but as it frequently conflicts with new slang releases, it would be nice to see get this upstream. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Sam Estep <sam@samestep.com>
* CMake: Guard inclusion of VULKAN_HEADERS and SPIRV-Headers (#8124)Sergei Popov2025-08-19
| | | | | | | | | | | Don't include the VULKAN_HEADERS and SPIRV-Headers submodule if they are already included. Fix for the https://github.com/shader-slang/slang/issues/7898. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
* Update LLVM from 13.0.1 to 14.0.6 (#8031)Sam Estep2025-08-07
| | | | | | | | | | | | | | | | | Full set of mutually exclusive choices for upgrading LLVM: - #8031 (you are here) - #8035 - #8036 - #8034 - #8038 - #8039 - #8033 Alternative to #8028. Required some minor changes due to these upstream commits: - llvm/llvm-project@e463b69736da8b0a950ecd937cf990401bdfcdeb - llvm/llvm-project@89b57061f7b769e9ea9bf6ed686e284f3e55affe
* Update to latest slang-rhi (#8006)Simon Kallweit2025-07-31
| | | | | * Update to latest slang-rhi * Fix for vulkan sampler
* Update slang-rhi to fix CI error on debug. (#7946)Yong He2025-07-28
| | | | | | | * Update slang-rhi * Fix profile lookup on `nullptr`. * update rhi
* Fix SLANG_USE_SYSTEM_SPIRV_HEADERS=TRUE (#7916)Ellie Hermaszewska2025-07-25
| | | | | | find_package is locally scoped, so like other find_packages we should do it at the top level Closes https://github.com/shader-slang/slang/issues/7643
* Remove a test from expected-failure-github for MacOS (#7526)Jay Kwak2025-07-03
| | | | | This commit removes the following test from expected-failure-github.txt because the issue is addressed on slang-rhi side. tests/compute/cbuffer-legalize.slang.2 syn (mtl)
* fix spirv-opt bug (#7565)kaizhangNV2025-06-30
| | | | | | Close #7491. As the PR KhronosGroup/SPIRV-Tools#6198 is already merged, we can switch spirv-tools repo to upstream repo now.
* Reset minimum cmake version to 3.22 (#7548)Gangzheng Tong2025-06-30
| | | | | * Reset minimum cmake version to 3.22 * update slang-rhi
* Enable Vulkan Validation Layer in CI (#7543)Gangzheng Tong2025-06-27
| | | | | | | | | | | | | * Disable spirv-opt for the tests with debugfunction VVL errors * Enable VVL in CI * Add 2 expected failure tests until we update VVL to 1.4.319 which contains the fix * update slang-rhi * Revert "Disable spirv-opt for the tests with debugfunction VVL errors" This reverts commit 5327460057f533af81ea60a556e43abe805d5816.
* Update spirv-tool submodule to include the debug instruct fix (#7541)kaizhangNV2025-06-26
| | | | | | | | | | | | * Update spirv-tool submodule to include the debug instruct fix Update spirv-tool to our forked repo that include the fix of spirv-val bug. It mistakenly relocates the `DebugFunctionDefinition`. The upstream PR is: https://github.com/KhronosGroup/SPIRV-Tools/pull/6198 But it's still pending on review. Issue #7491 will keep track the process, when the upstream PR is merged, we need to restore the repo back to upstream repo.
* Update spirv-tools to for SDK v2025.3 (#7519)Gangzheng Tong2025-06-26
|
* Update spirv-tools and spirv-headers (#7500)jarcherNV2025-06-21
| | | | | | | | | Update spirv-tools to commit: 108b19e5c6979f496deffad4acbe354237afa7d3 Update spirv-headers to commit: 2a611a970fdbc41ac2e3e328802aed9985352dca Update spirv-tools-generated from the spirv-tools build.
* Enabling optix ci pipeline (#7311)Harsh Aggarwal (NVIDIA)2025-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Revert "Disable OptiX tests by default. (#1331)" This reverts commit e45f8c1f49855cebe90b6722324ec24146ff5a3d. * Enable optix submodule to build Add support for default entry points in compilation Implemented logic to check for defined entry points in the module when no explicit entry points are provided. If found, these entry points are added to the `specializedEntryPoints` list, with the assumption that no specialization is needed for them at this time. * Disable optix if cuda is not enabled * Add submodule OptixSDK path in search * Distinguish user-explicit vs auto-detected SLANG_ENABLE_OPTIX When SLANG_ENABLE_OPTIX is explicitly set by user and CUDA is not available, show SEND_ERROR to maintain strict validation. When OptiX is auto-detected (e.g., local submodule present) but CUDA unavailable, gracefully disable with STATUS message to allow builds to continue. This addresses review feedback to keep error for explicit requests while handling auto-detection gracefully. * Apply CMake formatting to SLANG_ENABLE_OPTIX validation logic * revert: slang-rhi changes as those are merged independently as in PR # slang-rhi#400
* Update slang-rhi (#7457)Simon Kallweit2025-06-19
| | | | | * update slang-rhi * enable all slang-rhi tests
* Fix SLANG_USE_SYSTEM_SPIRV_HEADERS (#7371)Emil Imbert Villumsen2025-06-13
| | | | | | | | | | | | | | | | | | * Use aliased SPIRV-Headers::SPIRV-Headers to also work with an installed SPIRV-Headers SPIRV-Headers standalone is only defined when using sources directly. When consuming an installed SPIRV-Headers via find_package, the full SPIRV-Headers::SPIRV-Headers must be used. The full syntax is supported by both source and installed builds. * Fix SLANG_USE_SYSTEM_SPIRV_HEADERS - Use find_package to bring in SPIRV-Headers cmake targets - Set SPIRV-Headers_SOURCE_DIR as a workaround when including spirv-tools - Query cmake for SLANG_SPIRV_HEADERS_INCLUDE_DIR location, supporting default, SLANG_OVERRIDE_SPIRV_HEADERS_PATH and find_package builds. - Cleanup unnecessary SPIRV_HEADER_DIR (unconditionally overwritten in spirv-tools)
* Re-enable running slang-rhi-tests (#7360)Simon Kallweit2025-06-13
| | | | | | | | | | | | | | | | | | | | * enable building slang-rhi-tests * re-enable running slang-rhi-tests * format code * fix typo * update slang-rhi * build slang-rhi-tests without glfw dependency * skip fence tests --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: amey asgaonkar <160177341+aasgaonkar@users.noreply.github.com>
* Disable coopvec while using Agility SDK and until graphics driver supports ↵Jay Kwak2025-06-06
| | | | | | | it (#7357) * Disable coopvec tests until we have the driver support * Remove conflicting agility sdk binaries
* Update slang-rhi (#7303)Simon Kallweit2025-06-06
| | | | | | | | | | | | | | | | | | | | | * update slang-rhi * adapt to new slang-rhi API * enable slang-rhi agility sdk * fix handling empty list * disable failing slang-rhi tests * format code * fix slang-rhi-tests ci step * skip running slang-rhi-tests --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Update spirv-tools to point at 7dda3c01f (#7352)jarcherNV2025-06-05
| | | | | Update spirv-tools to take the DebugBuildIdentifier changes. These are needed for upcoming separate debug spirv output. Additionally update spirv-headers to fd966619.
* Fix crash when loading modules with syntax errors (#6993) (#7288)Harsh Aggarwal (NVIDIA)2025-06-05
| | | | | | | | | | | | | | * Fix#6993 - Emit Diagnostic Warning and Fix SIGSEGV * Update external/slang-rhi submodule * Add checks for valid stage names for paq in SemanticsVisitor check * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
* Revert "Remove a workaround disabling dxc-fetch" (#7348)Jay Kwak2025-06-04
| | | This reverts commit 2d98381501140bdf519f2a28c417b205187525c7.
* Change SLANG_OVERRIDE_xxx_PATH and fix header file path (#7207)Lujin Wang2025-05-30
| | | | | | | | | | | | | | | | | | | | | | | | * Fix lua header file path Add two missed files in #7167 * Fix lua header file path Add two missed files in #7167 * Leave lua/ in the path to avoid name conflict * Remove xxx from path of SLANG_OVERRIDE_xxx_PATH Change SLANG_OVERRIDE_xxx_PATH from path-to-parent-folder/xxx to path-to-parent-folder and add "xxx/" back to "#include", which helps to avoid the potential name conflict of external tools. * format code --------- Co-authored-by: Yong He <yonghe@outlook.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Remove a workaround disabling dxc-fetch (#7276)Jay Kwak2025-05-30
|
* Update build to allow setting more external paths (#7044)lujinwangnv2025-05-10
| | | | | | * Update build to allow setting more external paths Update the build to allow setting user-specific paths for the external modules: glm, imgui, slang-rhi, and tinyobjloader.
* Update spirv-tools to for SDK v2025.2 (#6893)Gangzheng Tong2025-04-25
| | | | | | | | | | | | | | | | | | | | * Update spirv-tools to for SDK v2025.2 Fixes: #6850 * bump spirv version to 1.4 for op linkage * skip-spirv-validation for coop mat * add skip-spirv-validation option to slang session desc * use SPV_ENV_UNIVERSAL_1_6 for spirv-tool env target 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>
* disable slang-rhi cmake install (#6900)Simon Kallweit2025-04-24
|
* update slang-rhi (#6587)Simon Kallweit2025-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update slang-rhi submodule * slang-rhi API changes * disable agility sdk * fix texture creation * update formats in tests * Extent3D rename * use 1 mip level for 1D textures for Metal * fix texture upload * update to latest slang-rhi * update slang-rhi * format code * update slang-rhi * do not run texture-intrinsics test on metal * update slang-rhi * deal with failing tests * fix more tests * update slang-rhi --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Simon Kallweit <simon.kallweit@gmail.com>
* Add Yet Another Source Code Generator (#6844)Theresa Foley2025-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Yet Another Source Code Generator This change introduces an offline source code generation tool, provisionally called `fiddle`. More information about the design of the tool can be found in `tools/slang-fiddle/README.md`. Yes... this is yet another code generator in a project that already has too many. Yes, this could easily be a very obvious instnace of [XKCD 927](https://xkcd.com/927/). This change is part of a larger effort to change how the AST types are being serialized, and the way code generation for them is implemented. Right now, the source code for the new tool is being checked in and the relevant build step is enabled, just to make sure everything is working as intended, but please note that this change does *not* introduce any code in the repository that actually makes use of the new generator. All of the AST-related reflection information that feeds the current serialization system is still being generated using `slang-cpp-extractor`. The design of the new tool is primarily motivated by the new approach to serialization that I'm implementing, and once that new approach lands we should be able to deprecate the `slang-cpp-extractor`. In addition, the new tool should in principle be able to handle many of the kinds of code generation tasks that are currently being implemented with other tools like `slang-generate` (used for the core and glsl libraries). This tool should also be well suited to the task of generating more of the code related to the IR instructions. * format code * Build fixes caught by CI * Fix another warning coming from CI * Another CI-caught fix * Change bare hrows over to more proper abort execptions * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* fix(d3d11): correct parameter in VSSetConstantBuffers1 from uavCount … (#6690)Harsh Aggarwal (NVIDIA)2025-04-04
| | | | | | | | | | | | | | | | | | | | * fix(d3d11): correct parameter in VSSetConstantBuffers1 from uavCount to cbvCount (fixes #6531) Root cause - Incorrect parameter passing in slang-rhi 1. slang-rhi #281 - Add the correct cbvCount for setting Constant Buffer 2. Prevent render tests from overwriting reference images * Add missing tests/render/multiple-stage-io-locations.slang.3.expected.png * Add more expected images from texture2d-gather * Add new option: skipReferenceImageGeneration For Github CI we set this to true - So we don't overwrite the expected images --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
* Use coopvec supporting dxcompiler.dll and dxil.dll (#6719)Jay Kwak2025-04-01
| | | | | * Use coopvec supporting dxcompiler.dll and dxil.dll * Fix the failing tests
* Fix MSVC warning D9025 when building external dependencies. (#6630)Yong He2025-03-18
| | | | | * Fix MSVC warning D9025 when building external dependencies. * revert unrelated change.
* Update build to allow setting external paths (#6528)jarcherNV2025-03-07
| | | | | | | * Update build to allow setting external paths Update the build to allow setting user-specific paths for the external modules. This allows building Slang without also fetching the external modules, assuming they are already present elsewhere locally.
* Update SPIRV-Tools and fix new validation errors. (#6511)Yong He2025-03-06
| | | | | | | * Update SPIRV-Tools and fix new validation errors. * Implement pointers for glsl target. * Reworked packStorage/unpackStorage code gen to operate on pointers rather than values.
* update slang-rhi (shader object refactor) (#6251)Simon Kallweit2025-02-27
| | | | | | | | | | | | | | | * remove unused resource * define buffer data * add vs2022 build presets * update slang-rhi API usage * update slang-rhi --------- Co-authored-by: Yong He <yonghe@outlook.com>
* bump glslang spirv-header spirv-tools (#6478)Ellie Hermaszewska2025-02-27
| | | Bump to latest public versions
* Bump glslang to vulkan-tmp-1.4.309 (#6477)Ellie Hermaszewska2025-02-27
| | | | | | | | | * hotfix slang-rhi * Fix missing include * external/glslang: 15.0.0-37-ga0995c49 -> vulkan-tmp-1.4.309 external/spirv-tools: v2024.4.rc2-44-g3364b982 -> v2024.4.rc2-48-gce37fd67"
* Fix and document static build (#6374)Ellie Hermaszewska2025-02-18
| | | | | | | | | | | * Set static stbi flag for static builds * Add missing SYSTEM directive for external includes * Add instructions for linking statically against slang --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Update build-llvm.ps1 (#6336)Yong He2025-02-11
| | | Co-authored-by: Yong He <yongh@outlook.com>