summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-08Handle import, entrypoint and global params in included files. (#3395)Yong He
* Handle `import`, entrypoint and global params in included files. * Fix language server. * Extend `_createScopeForLegacyLookup` for `__include`. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-12-08WIP: CMake (#3326)Ellie Hermaszewska
* 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
2023-12-06Update autodiff doc links.Yong He
2023-12-06Update README.md (#3383)Yong He
2023-12-06Update 04-modules-and-access-control.mdYong He
2023-12-06Change default visibility of interface members and update docs. (#3381)Yong He
* Update behavior around interfaces and docs. * Update toc --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-12-06Support visibility control and default to `internal`. (#3380)Yong He
* Support visibility control and default to `internal`. * Fix wip. * Fixes. * Fix. * Fix test. * Add legacy language detection and compatibility for existing code. * Add doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-12-05squash warnings (#3378)Ellie Hermaszewska
Co-authored-by: Yong He <yonghe@outlook.com>
2023-12-05Support `include` for pulling file into the current module. (#3377)Yong He
* Support `include` for pulling file into the current module. * Add auto-completion, hover info and goto-def support. * Disable warning for missing `module` declaration for now. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-29Improve generic type argument inference. (#3370)Yong He
* Improve generic type argument inference. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-28Misc language server fixes. (#3357)Yong He
2023-11-27Update 07-autodiff.mdYong He
2023-11-27typo in intro doc (#3350)mighdoll
Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-27typo re: global variables (#3351)mighdoll
Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-27Fix spirv intrinsics for partial derivatives. (#3355)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-21Add SPIRV intrinsics for texture footprint query. (#3345)Yong He
* Add SPIRV intrinsics for texture footprint query. * Cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-20Add missing SPIRV intrinsics for texture operations. (#3343)Yong He
* Add missing SPIRV intrinsics for texture operations.. * Fixes. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-20Allow whole program compile when using direct spirv backend. (#3342)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-17Add spirv intrinsic definition for `printf`. (#3340)Yong He
2023-11-17Update README.md (#3339)Yong He
2023-11-17warnings (#3335)Ellie Hermaszewska
* ignores * Remove unused variables * Squash out of bounds warning --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-16GLSL/SPIRV Fixes. (#3337)Yong He
2023-11-16experimental fix: return `JSONValue::Type::Null` as "" (#3336)Stephan Seitz
2023-11-16Unify stdlib `Texture` types into one generic type. (#3327)Yong He
* Unify Texture types in stdlib into 1 generic type. * Fixes. * Fix. * Fixes. * Fix reflection. * Fix binding reflection. * Add gather intrinsics. * Fix gather intrinsics. * Fix texture type toText. * Fix intrinsic. * fix cuda intrinsic. * Fix project files. * cleanup. * Fix. * Fix. * Fix sampler feedback test. * Fix getDimension intrinsics. * Fix spirv sample image intrinsics. * Fix test. * Fix GLSL intrinsic. * Cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-14Add GLSL Compatibility. (#3321)Yong He
* Parse glsl buffer blocks to GLSLInterfaceBlockDecl * Parse glsl local size layout declarations * Parse (and ignore) glsl version directives * spelling * Better l-value interpretation for glsl interface blocks * Better l-value interpretation for glsl interface blocks * Add compile flag for enabling glsl * Parse and ignore precision modifiers. * Automatically import `glsl` module for compatiblity. * Complete vector and matrix types for glsl * Remove generated file from repo * Bump .gitignore * do not mark out globals as params * Synthesize entrypoint layout from global inout vars. * update test result. * Allow HLSL semantic on global variables. * Fix. * Fix test. * Fix win32 compile error. * Add more builtin input/output and texture intrinsics. * Add struct/array constructor syntax. * Skip `#extension` lines. * overide operator * for matrix/vector multiplication. * Add `matrixCompMult`. * Parse modifiers in for loop init var declr. * Add more glsl intrinsics, add stage into to var layout. * Allow `int[3] x` syntax. * Fix array type syntax. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com> Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-13Fix Phi simplification bug (#3325)Ellie Hermaszewska
Fixes https://github.com/shader-slang/slang/issues/3323
2023-11-10 Cleanup builtin arithmetic interfaces. (#3317)Yong He
* wip: clean up IArithmetic * wip. * Cleanup builtin arithmetic interfaces. * Fix. * Fixes. * Fix. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-07Fix HitObject::GetInstanceIndex/ID() for glsl/spirv (#3315)Lin Hsu
Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-07Add `IRThisTypeWitness` to stand in for witness lookups inside an interface ↵Yong He
definition. (#3316) Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-07CUDA: Fixes for NVRTC 12.x and warp mask ambiguity; adds CC 8.x warp ↵Neil Bickford
reduction intrinsics. (#3314) * CUDA: Fixes for NVRTC 12.x, warp mask ambiguity; add reduction partial specializations. * Fixes running NVRTC on CUDA 12 without a specified profile (used in testing, e.g. `slang-test -api cuda -category wave`) * Fixes mask ambiguity between getting the lane index from threadId.x and a full mask of threads. * Adds partial specializations for compute capability 8.x warp reduction intrinsics. * Fix formatting
2023-11-06Fix ICE when lowering an associatedtype declref from an derived interface. ↵Yong He
(#3312) * Fix ICE when lowering an associatedtype declref from an derived interface. * Fixes. * Fix test. * Fix GLSL/SPIRV image subscript swizzle store regression. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-06Correctly pass values from the conditional block to the loop during ↵Ellie Hermaszewska
inversion (#3311) Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-03Add SubgroupQuad intrinsics for glsl/spirv. (#3310)Yong He
* Add SubgroupQuad intrinsics for glsl/spirv. * Fix. * Add test for quad intrinsics. * fix. * improve diagnostics text. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-03Update 07-autodiff.mdYong He
2023-11-03Add more diagnostics on invalid custom derivative use. (#3309)Yong He
* Add more diagnostics on invalid custom derivative use. * cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-02Fix crash when writing to `no_diff` out parameter. (#3308)Yong He
* Fix crash when writing to `no_diff` out parameter. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-02Several spirv intrinsics and small fix (#3307)Ellie Hermaszewska
* spirv intrinsic for faceforward * spirv intrinsic for fwidth * spirv intrinsic for modf * spirv intrinsic for nonuniformresourceindex * spirv intrinsic for transpose * Make sure address space matches for OpAccessChain * Correct placement for OpDecorate instructions in spirv asm blocks
2023-11-01Add mnemonic parsing for `intrinsic_type` modifier. (#3306)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-01Parameter binding and gfx fixes. (#3302)Yong He
* Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-01Add OpDot for spirv (#3304)Ellie Hermaszewska
Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-01add support for dx 6.7 profiles (#3299)skallweitNV
2023-10-26Disable frexp test on swiftshader. (#3294)Yong He
* Disable frexp test on swiftshader. * Fix windows release script. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-26Remove use of `::set-output` in github actions. (#3293)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-26Update to Bearer/tap/gon for macos notarization. (#3292)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-26Make the exponent return value from frexp int (#3284)Ellie Hermaszewska
* Make the exponent return value from frexp int Fixes https://github.com/shader-slang/slang/issues/3282 * Update slang-llvm. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-26Add more diagnostics around use of custom derivatives. (#3291)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-26Fix generic specialization bug. (#3290)Yong He
* Fix generic specialization bug. * Update test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-25Update autodiff-texture example with one that auto-diffs a reference impl. ↵Sai Praveen Bangaru
(#3288)
2023-10-25Fix warnings for gcc 12.3 (#3286)Ellie Hermaszewska
* Silence a few gcc out of bounds warnings * Search upwards from executable for prelude directory instead of assuming depth * comment wording * Check return values of read and write * Correct path to vulkan headers in gfx * Correct diagnostic on missing file in slang-embed * Do not use absolute path to libraries in test-context.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-10-25Fix single iteration loop detection logic. (#3287)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>