summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAge
...
* Revert "Fetch slang-llvm.so from correct release (#4847)" (#4893)Yong He2024-08-20
| | | This reverts commit 579d59c761cb0460701e0e820eb066275fe357b3.
* Fetch slang-llvm.so from correct release (#4847)Ellie Hermaszewska2024-08-20
| | | | | | | | | | | | | | | | | | * Fetch slang-llvm.so from correct release Closes https://github.com/shader-slang/slang/issues/4648 Should close https://github.com/shader-slang/slang/issues/4812 * Update docs * Correct documentation on cmake option * Neaten cmake script * Fix fetching on windows --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Install the missing public headers in release package (#4712)kaizhangNV2024-07-23
| | | | | | | | | In the change: 2db15080 Move the file public header files to `include` dir (#4636) we miss the installation of the public headers as they move to a new `include` folder, and cpack doesn't catch those automatically. Therefore, add the install command to install those headers.
* Feature/capture (#4625)kaizhangNV2024-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add decoder * Add a replay executable to consume the decoded content Add file-processor.cpp/h where we implement the logic to process the captured file block by block. Each block is: function header + parameter buffer + function tailer + function output[optional]. After reading one block, the block of data is sent to decoder module to dispatch the corresponding API. Add slang-decoder.cpp/h where we implement the logic to dispatch the slang API according to the input block data. - Rename api_callId.h to capture-format.h - Renmae capture_utility.cpp to capture-utility.cpp - Renmae capture_utility.h to capture-utility.h - Change the #include file name accordingly. * Reorganize source files structure Move all the capture logic code into `capture` directory. - the capture code will be build with slang dll. Move all the replay logic code into `relay` directoy. - the replay code is not part of slang dll, it will be built as a stand alone binary and link against slang dll. Change the #include file names accordingly. Add tools/slang-replay/main.cpp for the slang-replay stand alone binary place holder. Will implement it later. Update premake5.lua accordingly. * Update cmake files Update cmake files to change the build process for capture and relay system. - capture component should be build with slang dll, so we should not include replay component. - replay component should be a separate executable tool, which should not include capture component. - In order to easy use our current cmake infrastructure, move the shared files to a `util` folder - change the header include path * Redesgin the interfaces of consumers Fix some issues in capture Finish implementing all slang-decoder functions * Fix the AppleClang build issue * Address few comments - Fix the weird indent issues. - Correct the function name for CreateGlobalSession() - Rename file-processor to captureFile-processor to be more specific. - Use Slang::List instead of std::vector * record/replay: name refactor change Refactor the naming. Change the name "encoder/capture" to "record".
* Move the file public header files to `include` dir (#4636)kaizhangNV2024-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move the file public header files to `include` dir Close the issue (#4635). Move the following headers files to a `include` dir located at root dir of slang repo: slang-com-helper.h -> include/slang-com-helper.h slang-com-ptr.h -> include/slang-com-ptr.h slang-gfx.h -> include/slang-gfx.h slang.h -> include/slang.h Change cmake/SlangTarget.cmake to add include path to every target, and change the source file to use "#include <slang.h>" to include the public headers. The source code update is by the script like follow: ``` fileNames_slang=$(grep -r "\".*slang\.h\"" source/ -l) for fileName in "${fileNames_slang[@]}" do echo "$fileName" sed -i "s/\".*slang\.h\"/\"slang\.h\"/" $fileName done ``` * Fix the test issues * Fix cpu test issues by adding include seach path * Update cmake to not add include path for every target Also change "#include <slang.h>" to "include "slang.h" " to make the coding style consistent with other slang code. * Change public include to private include for unit-test and slang-glslang
* Fix release configuration for macOS. (#4629)Yong He2024-07-13
|
* Statically link MSVC runtime (#4613)Ellie Hermaszewska2024-07-11
| | | | | * Statically link MSVC runtime * Statically link MSVC runtime for llvm
* More precise handing of option dependencies (#4612)Ellie Hermaszewska2024-07-11
|
* Cope with failed version parsing (#4609)Ellie Hermaszewska2024-07-11
| | | | | | | | | * Cope with failed version parsing * Better version parsing * populate slang-tag-version with cmake * Neaten cmake
* Specialize address space during spirv legalization. (#4600)Yong He2024-07-10
| | | | | | | | | | | * Specialize address space during spirv legalization. * Fix. * Fix building doc. * Fix cmake. * Update assert.
* WIP Drop Premake (#3703)Ellie Hermaszewska2024-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove premake lua * Remove premake generated vs project * remove deps file * Remove premake driving bat files * Full test matrix under CMake * Remove premake based ci workflows * Wiggle CI * remove cmake from ci name * find frameworks correctly on osx * remove cmake from ci name * Cope with sccache not being available * cmake based falcor tests * ci wobble * only install ninja if necessary * more appropriate cache name * Remove premake from build instructions * Add some docs on ci setup * remove premake from regression tests * remove premake from perf test * Set SLANGC_PATH * ci wobble * bump slang-binaries * ci wobble * Bump spirv tools * dont use timestamp in cache * remote debug code * cache key wobble * Install sccache after building llvm * Do not build llvm tools * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * Tests spirv via glsl in ci * Define SLANG_ENABLE_XLIB=1 * osx builds on aarch64 * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * package documentation and metadata with cmake * ci wobble * Split hlsl double intrinsic tests * ci wobble * Correct type for double log10 Fixes https://github.com/shader-slang/slang/issues/4549 * remove working test from expected failures * add broken test to expected failures * smaller build for falcor tests * ci wobble * A few exclusions in ci * wip, release script * Enable examples in ci * neaten release script * Correct building docs * Only use xlib vulkan when slang_enable_xlib is true * bump slang-llvm version * Remove toolchain file use * Bump slang-llvm preset version * slash direction * Improve build directions * Add msvc cross build documentation * Disable old release files * Smaller set of releases for test * Allow not building llvm * simplify release matrix * Cross releases * formatting * formatting * ci wiggle * ci wiggle * cleaner * neaten * ci wobble * formatting * Install cross tools on linux * do not clean build dir * neaten ci * neaten ci * neaten ci * remove unused release workflow files * Build llvm on some platforms * neaten ci * notarize on osx * s/x64/x86_64 * ci wobble * Embed stdlib for release build * wobble ci * wobble ci * s/x64/x86_64 * ci wobble * ci wobble * ci wobble * vk-gl-cts on cmake * neaten ci * neaten ci * bump cache action version * Cope with windows being weird about case * old glibc version * old glibc version * Correct action file * Keep cache hot on main branch * separate small script for old glibc releases * ci wobble * ci wobble * Run cmake outside of docker * only sign on releases * Revert "Run cmake outside of docker" This reverts commit a58aaba939a4aa35fe70962fd60d9512b143592f. * python3 on build image * less parallel * ci wobble * ci wobble * ci wobble * newer git * ci wobble * ci wobble * Use newer docker image * Use newer docker image * sccache wobble * permissions issue * neaten * build llvm in ci * build llvm in ci * Remove linux clang build in ci * Only install crossbuild tools on non-aarch64 systems * neaten ci.yml * Correct github matrix * Simplify github matrix * ci wobble * Disable broken test See https://github.com/shader-slang/slang/issues/4589 * ci wobble * Neater slang-llvm archive filename * Neater path for uploading artifacts * Neater ci names * Use Windows SDK 10.0.19041.0 in cmake builds
* Include readme and license in release files (#4595)Ellie Hermaszewska2024-07-10
|
* Resource searching for examples (#4518)venkataram-nv2024-07-01
|
* Set debug working directory for slangc.exe (#4513)Jay Kwak2024-07-01
| | | | | | | | This commit changes the working directory setting in Visual Studio Debugging from "build" directory to the root of the repository. It is often the case that the users debug slang shaders under "tests" directory, and the working directory needs to be manually changed to the root directory of the repository.
* Include examples in default build (#4482)venkataram-nv2024-06-27
| | | | | * Include examples in default build * Omit building examples on unnecessary CI workflows
* Increase MSVC warning level to 4 for Slang projects (#4207)Jay Kwak2024-05-30
|
* [gfx] metal backend skeleton (#4223)Simon Kallweit2024-05-27
| | | | | | | | | | | | | | | | | | | | * add metal-cpp submodule * add metal-cpp cmake target * gfx metal backend skeleton * add premake support * add foundation framework * add metal-cpp include to premake * update vs project file --------- Co-authored-by: Simon Kallweit <skallweit@nvidia.com> Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
* This commit increases the minimum CMake version from 3.20 to 3.25. (#4193)Jay Kwak2024-05-20
| | | | | I was trying to see if I can lower it to 3.16, but I found that we are currently using CMake feature that requires a version 3.25 not 3.20. This finding is not new. I made a similar change to CMakePresets.json a few days ago. At that time, I didn't realize that the same change had to be made for CMakeList.txt as well.
* Fixes running examples from generated SLN (#4173)Hai Nguyen2024-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixes running examples from generated SLN This CL contains changes to CMakeLists.txt that enables the examples to run from within Visual Studio when using CMake generated solution. Previously the working directory was set to examples/<example name> and which resulted in an invalid path in the generated project files. Additionally, the assets (shaders, images, models) were not in location that was accessible to the executable when ran from within Visual Studio. - Changed examples to use ${CMAKE_BINARY_DIR}/${dir} instead of ${dir} if generator is MSVC. - Add custom target to assets (shaders, images, models, etc) to example subdir under ${CMAKE_BINARY_DIR} - Add dependency to copy prebuilt binaries if building examples in MSVC so DirectX shader signing doesn't fail - Changed copy-prebuilt-binaries to use copy_if_different to avoid redundant copies The initial build time is increased by 20 seconds (16%) from 2m3s to 2m23s, due to the asset copy. The incremental build time remained same at 4 seconds. * Corrected tabs to spaces Corrected unintentional use of tabs instead of spaces. --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
* Updating CONTRIBUTION guide to use CMake (#4017)Jay Kwak2024-04-24
| | | | | | | | | | | | | | | | | | | | | Releated to #3703 Removing the build instruction with Premake and replacing it with an instruction with CMake. It is because we are going to move over to CMake anytime soon. Bumping the required CMake version to 3.25.0. When CMakePresets.json has "version:6", it requires CMake version to be 3.25 or above. See the URL below for more information, https://cmake.org/cmake/help/latest/release/3.25.html CMakeLists.txt copies the prebuilt binary files from external/slang-binaries/bin/windows-x64 CMakeLists.txt was copying "slang-llvm.dll" to build/Release/lib directory when it should have been build/Release/bin. It made slang-test to ignore all FILECHECK tests. This is fixed. Co-authored-by: Yong He <yonghe@outlook.com>
* [gfx] use CUDA driver API (#3776)skallweitNV2024-03-15
|
* CMake fixes for MacOS (#3761)Craig Kolb2024-03-13
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Fix linking of slang-bootstrap by linking with slang-lookup-tables (#3618)NBickford2024-02-22
|
* cmake: option to build a static library version of slang (#3578)Lukas Lipp2024-02-15
| | | | | | | | | * cmake: slang lib type setting * cmake: change name for slang lib type setting --------- Co-authored-by: Yong He <yonghe@outlook.com>
* cmake: add options to disable gfx, test, example, ... targets (#3572)Lukas Lipp2024-02-14
| | | | | | | | | | | | | | | | | | | | | | | * cmake: add options to disable gfx, test and example targets * cmake: enable gfx, test, example targets by default * cmake: use same naming scheme * cmake: option to disable slangd and slangc targets * cmake: option for enabling slang-rt target * cmake: option to deactivate llvm and glslang * cmake: better option text * cmake: remove duplicate slang-llvm option * doc: update docs/building.md --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Generate lookup tables from cmake (#3461)Ellie Hermaszewska2024-01-24
| | | | | | | | | | | | | | | | | | | * Generate lookup tables from cmake * Correct add_custom_command generator dependencies * set options for lookup table source * include path * use slang_add_target for capability generated targets * vs project regenerate * ci wobble --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Capability def parsing & codegen + disjoint sets (#3451)Yong He2024-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Capability def parsing & codegen + disjoint sets This change adds a capability definition file, and a code generator to produce C++ code that defines the capability enums and necessary data structures around the capabilities. Extends the existing CapabilitySet class to support expressing disjoint sets of capabilities. This sets up for the next change that will enhance our type checking with reasoning of capability requirements. * Fix cmake. * Fix warning. * Fix. * Fix isBetterForTarget to prefer less specialized option. * Fix. * Fix premake. * Fix intrinsic. * Fix vs sln file. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* macos/vulkan support (#3418)skallweitNV2023-12-18
|
* WIP: CMake (#3326)Ellie Hermaszewska2023-12-08
* More robust input and output selection in generator tools * Add cmake build system * Get slang-test running with cmake * Bump lz4 and miniz dependencies * Make cmake build more declarative * Correct preprocessor logic in slang.h * Add cuda test to compute/simple * Remove empty cmake files * output placement for cmake, and commenting * Correct include paths in spirv-embed-generator * Format cmake with gersemi * Make cmake build clerer * Neaten header generation Also work around https://gitlab.kitware.com/cmake/cmake/-/issues/18399 by introducing correct_generated_properties to set the GENERATED flag in the correct scope * remove unused files * use 3.20 to set GENERATOR property properly * spelling * more flexible linker arg setting * replace slang-static with obj collection * Set rpath and linker path correctly * neaten generated file generation * tests working with cmake build * fix premake5 build * comment and neaten cmake * remove unnecessary dependency * Build aftermath example only when aftermath is enabled * Add slang-llvm and other dependencies * Put modules alongside binaries * Find slang-glslang correctly * Better option handling * comments * add llvm build test * Better option handling * cmake wobble * use UNICODE and _UNICODE * remove other workflows * use ccache * neaten * limit parallel for llvm build * use ninja for build * Windows and Darwin slang-llvm builds * cache key * verbose llvm build * cl on windows * sccache and cl.exe * use cl.exe * Correct package detection * less verbosity * Simplify miniz inclusion * fix build with sccache * Neaten llvm building * neaten * Neaten slang-llvm fetching * more surgical workarounds * Add ci action * Get version from git * better variable naming * add missing include * clean up after premake in cmake * more docs on cmake build * ci wobble * add imgui target * more selective source * do not download swiftshader * Some missing dependencies * only build llvm on dispatch * Disable /Zi in CI where sccache is present * simplify * set PIC for miniz * set policies before project * reengage workaround * more runs on ci * Add cmake presets * Add cpack * move iterator debug level to preset * Correct lib flag * simplify action * Neaten cmake init * Add todo * Add simple test wrapper * Add tests to workflow presets * rename packing preset * Correctly set definitions * docs * correct preset names * Make slang-test depend on test-server/test-process * neaten * use workflow in actions * install docs * Correct module install dir * debug dist workflow * Install headers * neaten header globbing * Neaten dependency handling * make lib and bin variables * Do not set compiler for vs builds, unnecessary * docs * allow setting explicit source for target * maintain archive subdir * cmake docs * install headers * place targets into folders * cmake docs * nest external projects in folder * remove name clash * Neater external packages * meta targets in folder structure * cleaner slang-glslang dll * Add missing static directive to slang-no-embedded-stdlib * more robust module copying * make slang-test the startup project * folder tweak * Make FETCH_BINARY the default on all platforms * Set DEBUG_DIR * add natvis files to source * skip spirv tests * remove test step from debug dist * Add build to .gitignore * redo warnings to be more like premake * Update imgui * clean more premake files * Disable PCH for glslang, gcc throws a warning * Add /MP for msvc builds * warning wobble * Add script to build llvm * Add slang-llvm and generators components * Build slang-llvm in ci * comments * fetch llvm with git * better abi approximation for cache * better sccache key * formatting * Correct logic around disabling problematic debug info for ccache * exclude gcc and clang from windows ci * Make dist workflows use system llvm * naming * restore normal dist builds * formatting * run tests in ci * Correct slang-llvm url setting * Rely on the system to find the test tool library * actions matrix wiggle * cope with OSX ancient bash * Correct compilers on windows * more ci debugging * Correct rpath handling on OSX * neaten * correct path to slang-llvm * Correct rpath separator on osx * Find slang-llvm correctly * smoke tests only on osx * ci wobble * Give MacOS module a dylib suffix * get swiftshader correctly * cope with bsd cp * remove debug output * full tests on osx * ci wobble * Add some vk tests to expected failures * simplify ci * ci wobble * exclude dx12 tests from github ci * remove cmake code for building llvm * warnings * warnings as errors for cl * spirv-tools in path * add aarch64 ci build * Add SLANG_GENERATORS_PATH option for prebuilt generators * neaten * Correct generator target name * remove yaml anchors because github actions does not support them * Demote CMake in docs Also add info on cross compiling * Restore premake CI * use minimal ci for cmake * Write miniz_export for premake build and .gitignore it * Mention build config tool options in docs * Remove redefined macro for miniz * regenerate vs project