summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
2023-06-01Be lenient on same-size unsigend->signed conversion. (#2913)Yong He
* Be lenient on same-size unsigend->signed conversion. * Fix tests. * Use 250. * wip * Fix. * Fix tests. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-31Fix def-use legalization in CFG normalization. (#2909)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-31Preserve type cast during AST constant folding. (#2912)Yong He
* Preserve type cast during AST constant folding. Fixes #2891. * Fix. * Fix truncating. * fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-31Fix div-by-zero error during sccp. (#2911)Yong He
* Diagnose on div-by-zero during sccp. * fix --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-30Fix type checking & loop value hoisting (#2907)Yong He
* Fix type checking crash in language server. * Fix loop var hoisting logic. Fixes #2903. * fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-30Fix derivative signature bug in checkDerivativeAttribute. (#2905)Yong He
2023-05-30Disallow duplicate enumerator names in the same enum (#2904)Ellie Hermaszewska
Fixes https://github.com/shader-slang/slang/issues/2895
2023-05-26Fix bug in legalizeFuncType that leads to invalid IR. (#2902)Yong He
* Fix bug in legalizeFuncType that leads to invalid IR. * Diagnose on functions that never returns when differentiate it. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-23Add API for querying total compile time. (#2898)Yong He
* Add API for querying total compile time. * Optimize. * Remove redundant simplifyIR calls. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-22Source embedding for output (#2889)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Fix typo. * Add options for source embedding. * Small improvements. * Working with tests. * Add check for supported language types for embedding. * Try and remove assume warning. * Fix warning on MacOSX. * Some extra checking around Style::Text. * Some small improvements to docs/handling for headers extensions. * Fix md issue. * Small fixes around zeroing partial last element. * Another small fix.... * Small improvement in hex conversion. * Add an assert for unsignedness.
2023-05-18Add transpose logic for scalar swizzle (#2888)Yong He
2023-05-16Make `GetSequentialID` a hoistable inst. (#2887)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-14Add [Differentiable(n)] syntax to specify max order. (#2883)Yong He
2023-05-12Add finalized keywords for autodiff. (#2882)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-12Fusion pass for saturated_cooperation (#2874)Ellie Hermaszewska
* Fusion pass for saturated_cooperation * simplify assert * regenerate vs projects * missing test output files * rename shadowing variable to appease msvc * Fuse calls to sat_coop with differing inputs * formatting * add cpu test for hof simple * Make higher-order functions into compute comparison tests * comment tests * remove redundant test * Add test to confirm inlining in sat_coop fuse * Add clarifying comment for sat coop fusing * Add KnownBuiltin decoration * s/CanUseFuncSignature/TypesFullyResolved for higher order function checking * Add TODO * spelling * Correct detection of sat_coop calls * Disable tests which are unsupported on testing infra
2023-05-11MVP for higher order functions (#2849)Ellie Hermaszewska
* MVP for higher order functions * Add shader subgroup partitioned glsl intrinsics * Implement parsing and checking for tuple types Currently there is no way to do anything useful with them from the source language however * neaten * Correct precedence of function type parsing * neaten * higher order function tests * function types of any arity * Inference for higher order functions * Add second test for unsynchronized params * regenerate vs projects * dx11 -> dx12 for saturated cooperations tests * Disable saturated cooperation tests on vulkan They fail on release builds in CI, not essential for the higher order function work however * remove saturated-cooperation tests * Remove unnecessary assert and clarify control flow in AddDeclRefOverloadCandidates * Add Tuple type name mangling * Use functype keyword to introduce function types * Add more inference tests for hof --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-05-10Fix intellisense and autodiff crashes. (#2879)Yong He
* Fix intellisense crash. * Fix a bug in updateElement simplification. * cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-10Add slangc options for reporting downstream compile time. (#2878)Yong He
* Add slangc options for reporting downstream compile time. * Update doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-10Generate faster derivative for div by const operations. (#2877)Yong He
* Generate faster derivative for div by const operations. * Increase `kMaxIterationsToAttempt` to 256. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-09Various fixes for autodiff and slangpy. (#2876)Yong He
* Various fixes for autodiff and slangpy. * Fix cuda code gen for `select`. * Fix getBuildTagString(). * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-09Fix function side-effectness prop logic. (#2875)Yong He
2023-05-07Optimize logic around indexed temporary variables (#2873)Sai Praveen Bangaru
2023-05-06Don't store loop induction values + fix minor issue (#2872)Sai Praveen Bangaru
2023-05-05Fix checkpoint hints for higher-order autodiff (#2869)Sai Praveen Bangaru
2023-05-05Squash a couple of warnings on clang (#2870)Ellie Hermaszewska
* Squash a couple of warnings on clang Redisable -Wunused-local-typedefs * unused variable
2023-05-04Fix issue with out-of-order insts during type promotion when transposing ↵Sai Praveen Bangaru
code. (#2866) * Bugfixes for warped-area reparameterization * Update slang-ir-autodiff-transpose.h * Update slang-ir-autodiff-transpose.h * Mark all stdlib methods backward differentiable * Update diff.meta.slang --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-05-04Add SLANG_ASSUME and use it in release asserts (#2859)Ellie Hermaszewska
* Remove UNREACHABLE * formatting * Remove unused SLANG_EXPECT macros * Add SLANG_ASSUME and use it in release asserts * Reassure GCC that we are using memcpy responsibly --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-05-04Improvements around HLSLToVulkanLayout (#2867)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Improve the HLSLToVulkanLayoutOptions interface. Add more diagnostics. Add diagnostics test. * Add check for global binding using file check. * Fix issues with some tests around making some diagnostics ids unique. * Small improvements with doc/handling of vk-<>-shift option setup. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-05-03HLSL->Vulkan binding support (#2865)jsmall-nvidia
* WIP around VK shift binding. * Refactor around options parsing. * Remove needless passing around of sink. * Some more tidying around OptionsParser. * Handle vulkan shift parsing. * Fix small issue around vk binding and "all". * Fixing some small issues. Missing break. * Split out VulkanLayoutOptions * WIP binding taking into account HLSL->Vulkan options. * First attempt at making binding work with HLSLVulkanOptions. * VulkanLayoutOptions -> HLSLToVulkanLayoutOptions * WIP with HLSL-Vulkan binding. * Some more testing around vk-shift. * Improvements around global binding. More tests. * Improve test coverage. Improve checking for requirements around default space. * Update command line options. * Small fixes. * Small fix in options reporting. * Fix warning issue. * Some fixes for isDefault for HLSLToVulkanLayoutOptions. * Update hlsl-to-vulkan-shift output. The difference was due to default handling if shift isn't specified, and not being specified was not correctly tracked.
2023-05-03Improve intellisense for attribute arguments. (#2864)Yong He
2023-05-02gfx: fix vulkan validation errors. (#2861)Yong He
* Fix VK validation errors when using vk1.2 features. * Fix vulkan validation errors. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-02Various dxc/fxc compatibility fixes. (#2863)Yong He
* Various dxc/fxc compatibility fixes. * Cleanup. * Fix test cases. * Fix comments. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-05-02Update slang-options.cppjsmall-nvidia
2023-05-02Markdown CommandOptions (#2860)jsmall-nvidia
* WIP CommandOptions * Fix some output issues. * Simplify word wrapping. * Add file extensions. * Change how lookup takes place. Add appendSplit functions to StringUtil. Make Categories hold the index range of their options. * Small improvement. * Lookup with partial option names. * Associate user values. * Encoding flags in the name. * Refactor setting up of command options. * Use CommandOptions in slang-options. * Remove old help text. * Cache the CommandOptions on the Session. * Range checking. Fix bug in the Options handling. * Extra checks for validity. * Get categories directly. * Slight improvements over output. * Added NameValue types. * Fix typo. Remove some now unused diagnostics. Fix diagnostic in testing, as output has changed. * Add minimal usage message. * Remove platform executable extension from diagnostics output. * Some improvements around getting names from NameValue types. * Improve some option descriptions. * Small fixes. * WIP improvements around CommandOptions. * Split out CommandOptionsWriter. * Add links to options. * Add command line options reference. * Link to the reference command line information. * Add quick links. * Improvements around lookup. Add categories to linking. * Small additional fixes. * Add LinkFlags control. * Small text fixes. * Fix typo. * Fix typo. * Fix typo. * Add support for -g and -O using CommandOptions. * Improve generated doc output/descriptions. Remove options listed directly in documentation.
2023-04-29CommandOptions (#2856)jsmall-nvidia
* WIP CommandOptions * Fix some output issues. * Simplify word wrapping. * Add file extensions. * Change how lookup takes place. Add appendSplit functions to StringUtil. Make Categories hold the index range of their options. * Small improvement. * Lookup with partial option names. * Associate user values. * Encoding flags in the name. * Refactor setting up of command options. * Use CommandOptions in slang-options. * Remove old help text. * Cache the CommandOptions on the Session. * Range checking. Fix bug in the Options handling. * Extra checks for validity. * Get categories directly. * Slight improvements over output. * Added NameValue types. * Fix typo. Remove some now unused diagnostics. Fix diagnostic in testing, as output has changed. * Add minimal usage message. * Remove platform executable extension from diagnostics output. * Some improvements around getting names from NameValue types. * Improve some option descriptions. * Small fixes.
2023-04-28SSA Register Allocation improvements. (#2857)Yong He
* SSA Register Allocation improvements. * Fix. * Rename `Use`->`UseOrPseudoUse`. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-29vkd3d and dxvk integration (#2823)Ellie Hermaszewska
* Add d3d sources for linux builds * Return NOT_IMPLEMENTED for shared handle support on Linux * Enable DirectX api on Linux * Do not report DX11 support without FXC * Initial version of SynchAPI emulation * Neaten dx library name handling * Neaten and use posix-synchapi * Add premake option for DirectX on Vulkan * s/SLANG_ENABLE_VKD3D_PROTON/SLANG_ENABLE_VKD3D * Skip failing tests on vkd3d * Regenerate vs projects * Silence unused var warning
2023-04-29Minor tidyings around d3d usage (#2854)Ellie Hermaszewska
* Remove unused COM annotation * Move SLANG_ENABLE_DXBC_SUPPORT to slang.h * Add DX11 simple compute test * Remove unnecessary COM parameter annotation * Run compute smoke test for DX12 * Ignore d3d11 tests when we do not have fxc * Do not try to find NVAPI on Linux * Add some logs to .gitignore * Minor cleanups in d3d12 headers * Fix tautological comparison (due to integer overflow) * Limit OutputDebugStringA to Windows
2023-04-28Fix handling of `[PreferRecompute]`. (#2855)Sai Praveen Bangaru
Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com>
2023-04-28Use Index for FuncType param count (#2853)Ellie Hermaszewska
2023-04-27Embed stdlib documentation to AST. (#2851)Yong He
* Embed stdlib documentation to AST. * Extract documentation for attributes. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-27Small fixes to autodiff pass. (#2852)Yong He
* Remove obsolete assert in `extractPriamlFunc`. * Fix `findUniqueStoredVal` to ignore diff uses. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-27Prevent storing loads of global parameters. (#2850)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-26Intellisense: show info on decl kind and differentiability. (#2847)Yong He
2023-04-26Fix most of the disabled warnings on gcc/clang (#2839)Ellie Hermaszewska
2023-04-26Fix specialization dictionaries cleanup pass (#2844)Sai Praveen Bangaru
2023-04-26Autodiff support for dynamically dispatched generic method. (#2846)Yong He
* Autodiff support for dynamically dispatched generic method. * Fix. * Support dynamically dispatched generic type. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-26Add support for `kIROp_DefaultConstruct` (#2845)Sai Praveen Bangaru
2023-04-26For C-like targets, emit resource declarations before other globals (#2843)Sai Praveen Bangaru
* For C-like targets, emit resource declarations before other globals * Remove unused tests
2023-04-26Fix type legalization missing child upon recreate. (#2842)Yong He
* Fix type legliazation missing child upon recreate. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>