summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2023-04-25Support recomputing phi params in bwd prop func. (#2841)Yong He
2023-04-25StringBuilder to lowerCamel (#2840)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP lowerCamel Dictionary. * WIP more lowerCamel fixes for Dictionary. * Add/Remove/Clear * GetValue/Contains * Fix tabs in dictionary. Count -> getCount * Fix fields with caps. * Key -> key Value -> value Use m_ for members where appropriate. Use lowerCamel in linked list. * Some small fixes/improvements to Dictionary. * Kick CI. * Small tidy on String. * Append -> append * ToString -> toString ProduceString -> produceString * Small fixes. * StringToXXX -> stringToXXX * Fix typo introduced by Append -> append. * Made intToAscii do reversal at the end. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-04-25Cleanup checkpointing policy impl. (#2837)Yong He
* Cleanup checkpointing policy impl. * More cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-25Bump glm and stb + small neatenings (#2831)Ellie Hermaszewska
* bump glm to fix c++20 warnings * bump stb_image to fix c++20 warnings * Use static_assert for SLANG_COMPILE_TIME_ASSERT * Remove uses of deprecated is_pod * Remove bit operations between different enums
2023-04-25Dictionary using lowerCamel (#2835)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP lowerCamel Dictionary. * WIP more lowerCamel fixes for Dictionary. * Add/Remove/Clear * GetValue/Contains * Fix tabs in dictionary. Count -> getCount * Fix fields with caps. * Key -> key Value -> value Use m_ for members where appropriate. Use lowerCamel in linked list. * Some small fixes/improvements to Dictionary. * Kick CI.
2023-04-24Change AD checkpointing policy to recompute more. (#2836)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-24Fix issue with Obfuscated hash (#2834)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Remove legacy container writing. Test using module without source map. * Change hashing for obfuscated source map such that takes into account different line endings.
2023-04-24Update a1-03-obfuscation.mdjsmall-nvidia
2023-04-23Add support for `kIROp_MakeExistential` (#2832)Sai Praveen Bangaru
2023-04-22Fix corner case with multi-level break elimination (#2828)Sai Praveen Bangaru
2023-04-21Add support for `kIROp_FloatCast` (#2824)Sai Praveen Bangaru
* Add support for `kIROp_FloatCast` * Update float-cast.slang * Added flag to d3d options
2023-04-21Refactor checkpointing policy and availability pass. (#2826)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-21Update a1-03-obfuscation.mdjsmall-nvidia
2023-04-21Small obfuscation doc improvements (#2825)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Small improvements to obfuscation doc.
2023-04-21AD: Various fixes around dynamic dispatch (#2820)Sai Praveen Bangaru
* Add a test for the new diff material system * Various fixes for AD - inout primal context params converted to out params, - added attributed types to list of stored types - used differentiated primal func type instead of type of differentiated func to avoid tangling with user-code differential types. --------- Co-authored-by: Lifan Wu <lifanw@nvidia.com>
2023-04-21Correct vulkan extension name for inline uniforms (#2822)Ellie Hermaszewska
Fixes https://github.com/shader-slang/slang/issues/2821
2023-04-21Initial obfuscation documentation. (#2819)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Initial discussion around obfuscation. * Improve obfuscation documentation. * Spelling fix --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2023-04-21Add warning for returning without initializing out parameter (#2807)Ellie Hermaszewska
* Add warning for returning without initializing out parameter * Add unused prelude function to squash uninitialized out variable warnings
2023-04-20Update 04-interfaces-generics.mdYong He
2023-04-20Improve SourceMap coverage/testing (#2818)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * WIP around more value like behavior for SourceMap/StringPool. * Use default impls on SourceMap ctor/assignment. * Handle comparison of SourceMaps. Some small fixes. Expand unit tests.
2023-04-20Update a1-01-matrix-layout.mdjsmall-nvidia
2023-04-20Improvements outputting containers (#2815)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Moved JSON source map writing logic to JSONSourceMapUtil. * Use ArtifactHandler to read/write SourceMaps. Use ObjectCastableAdapter to hold SourceMap Only serialize SourceMap <-> JSON on demand. * Make some types swappable. * BoxValue impl. * Added asBoxValue. * Remove const get funcs. * Fix typo in asBoxValue. * Fix another typo in asBoxValue. * Slightly simplify conversion to blob of SourceMap. * WIP Api improvements around sourcemap/artifact/line-directive. * Small fix for asBoxValue * WIP outputting container with multiple artifacts. * Added ArtifactContailerUtil::filter to produce an artifact hierarchy that only contains "signficant" and "blobable" artifacts. * Make emitting IR disjoint to using a container. Added -emit-ir option. Simplfiy output. * Fix typo in options parsing. * Add a test that ouputs with an emit source map. * Enable emitting our SlangIR module if no targets are specified. * Fix issues constructing container. * Extra checks getting obfuscated source map from a translation unit. * Fix typo.
2023-04-20Changes for vkd3d proton (#2813)Ellie Hermaszewska
* Add some caches to .gitignore * Remove appendWideChars Use String::toWString instead * s/Sleep/sleepCurrentThread * formatting * Expand set of shared libraries which have buggy dlclose Work around https://github.com/microsoft/DirectXShaderCompiler/issues/5119 and https://github.com/doitsujin/dxvk/issues/3330 libdxcompiler.so invokes UB on dlclose, the dxvk libs break GDB when closed * Add assert for specialization failure on DX11 As a band aid for https://github.com/shader-slang/slang/issues/2805 * More fine grained selection of directx features
2023-04-19Make SourceMap a value type (#2812)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Moved JSON source map writing logic to JSONSourceMapUtil. * Use ArtifactHandler to read/write SourceMaps. Use ObjectCastableAdapter to hold SourceMap Only serialize SourceMap <-> JSON on demand. * Make some types swappable. * BoxValue impl. * Added asBoxValue. * Remove const get funcs. * Fix typo in asBoxValue. * Fix another typo in asBoxValue. * Slightly simplify conversion to blob of SourceMap. * Small fix for asBoxValue
2023-04-19Fixed issue with function signatures in higher-order AD (#2814)Sai Praveen Bangaru
Also added GetStringHash to non-differentiable insts Co-authored-by: Yong He <yonghe@outlook.com>
2023-04-18On demand SourceMap JSON serialization (#2811)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Moved JSON source map writing logic to JSONSourceMapUtil. * Use ArtifactHandler to read/write SourceMaps. Use ObjectCastableAdapter to hold SourceMap Only serialize SourceMap <-> JSON on demand.
2023-04-17Round trip source map (#2810)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Make output of obfuscation locs work in a slang-module. * Tidy up detection for writing serialized source locs. * Support for .zip references. Handling of obfuscated source maps read from containers. A test to check obfuscated source map working on a module. * When using obfuscation, always obfuscate locs instead of stripping them. We keep a source map, so we can still produce reasonable errors. * Write out source locs if debug information is enabled. * Check output without sourcemap. * Small fixes. * Small improvements around hash calculation for source map name. * Disable test that fails on x86 gcc linux for now. * Fix issues around obfuscated source map using lines rather than columns. Fix some issues around encoding/decoding. * Make column calculation of source locs take into account utf8/tabs. Don't special case obfuscated source map for lookup for source loc. * Support following multiple source maps. * Small fixes/improvements around SourceMap lookup.
2023-04-17WIP: "deprecated" attribute (#2698)Ellie Hermaszewska
* Implement deprecated attribute * Prevent duplicate deprecated diagnostic on non-overloaded functions * Use FileCheck for deprecation test * formatting
2023-04-15Add render api category to synthesized tests (#2808)Ellie Hermaszewska
2023-04-14Bugfix: compiler will run forever to eliminate dead code (#2809)winmad
* Add a test case that the compile will run forever * Fix. * fix. --------- Co-authored-by: Lifan Wu <lifanw@nvidia.com> Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-14Diagnose on using uninitialized `out` param. (#2803)Yong He
* Diagnose on using uninitialized `out` param. * Hack to allow `out Vertices<T>`. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-14Some small fixes with Windows/DX usage (#2797)Ellie Hermaszewska
* Correct case of windows.h includes * Use Slang::SharedLibrary to load directx dlls * s/max/std::max/ * Factor common OS code in calcHasApi * Add DXIL test for compute/simple * s/false/FALSE for calls to WinAPI functions * Factor common OS code in gfxGetAdapters * 2 missing headers d3d12sdklayers for ID3DDebug climits for UINT_MAX * Define out unused function on Linux * Only try to load Vulkan and CUDA on Windows or Linux * simplify D3DUtil::getDxgiModule * Remove WIN32_LEAN_AND_MEAN &co from source files Add a global define * Set WIN32_LEAN_AND_MEAN &friends in headers Restore previous state also * regenerate vs projects
2023-04-14Enable SLANG_ENABLE_DXIL_SUPPORT on non-Windows platforms (#2750)Ellie Hermaszewska
* Enable SLANG_ENABLE_DXIL_SUPPORT on non-Windows platforms This currently grabs the DXC headers from the system, rather than from external/dxc We should make this consistent by either pulling in the Windows adapter from DXC into external/dxc or by making the Windows builds use <dxc/dxcapi.h> * Update dxcapi and add DXC's WinAdapter * Use our copy of dxcapi.h for non-windows DXC usage * Only set -fms-extensions where necessary * Work around dxc dlclose bug * Neaten and comment dxc-compiler.cpp
2023-04-13Warn on float-to-double coercion for arguments. (#2802)Yong He
* Warn on float-to-double coercion for arguments. * Fix test. * Rename. * Fixup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-13Fix scalar swizzle write. (#2801)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-13Add inherit interface test. (#2800)Yong He
Fixes #2573. Co-authored-by: Yong He <yhe@nvidia.com>
2023-04-13Set sharedMem argument to 0 when launching cuda kernel. (#2799)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>