summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-07Add missing header in slang-glslang (#3055)Ellie Hermaszewska
Required for memcpy (not sure why this has started being important, but it is the correct thing to do) Co-authored-by: Yong He <yonghe@outlook.com>
2023-08-07Diagnostic improvements for direct spirv (#3053)Ellie Hermaszewska
* Fail on an unhandled spv operand * Diagnose on emitting a function with no definition or intrinsic * clearer error message * Add assert * Add assert * remove unused assert * Disagnostic on snippet parsing failure * Mention unimplemented instruction in error message * mention unhandled local instruction for spirv in error message * Allow specifying dump options in dumpIRToString --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-08-07Fix `Val` deduplication bug. (#3050)Yong He
* Fix `Val` deduplication bug. * Fix * Concat stdlib files into a single module. * Remove unnecessary logic in `resolve`. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-08-08Add missing empty case to Array::makeArray (#3058)Ellie Hermaszewska
2023-08-08Allow parsing some SPIR-V enums in intrinsics (#3062)Ellie Hermaszewska
* Add TokenReader::AdvanceIf overlaod for TokenType * Add some spirv defs to parser * Add comment
2023-08-08Simplify SpvTypeInstKey (#3063)Ellie Hermaszewska
2023-08-08sv_groupindex support for spirv (#3060)Ellie Hermaszewska
2023-08-08Fail on an unhandled spv operand (#3052)Ellie Hermaszewska
Co-authored-by: Yong He <yonghe@outlook.com>
2023-08-07Correct return type for emitFieldAddress (#3051)Ellie Hermaszewska
2023-08-04Add option to use original entrypoint in spirv output. (#3047)Yong He
* Add option to use original entrypoint in spirv output. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-08-04Redesign `DeclRef` and systematic `Val` deduplication (#3049)Yong He
* Redesign DeclRef + Deduplicate Val. * Update project files * Fix warning. * Fix. * Fix. * Remove `Val::_equalsImplOverride`. * Rmove `Val::_getHashCodeOverride`. * Remove `semanticVisitor` param from `resolve`. * Cleanups. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-08-04Added D3D12 RenderTargetView TextureCube case (#3048)SirKero
* Added D3D12 RenderTargetView TextureCube case * Added D3D12 DepthStencilView TextureCube case --------- Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
2023-08-03Fix around texture footprint support for NVAPI. (#3046)jsmall-nvidia
2023-08-03Disable code motion for expensive insts (call & div) (#3042)Sai Praveen Bangaru
* Disable code motion for expensive insts (call & div) The current redundancy removal pass does not consider control-flow within loops and as a result can sometimes move dynamic dispatch code outside their switch blocks, if they are nested in a single-iter-loop. * Update liveness.slang.expected
2023-08-02Only define atomics for `float2` and `float4` when CUDA arch<900 (#3041)Sai Praveen Bangaru
From Ada onwards, these definitions are already available in CUDA's stdlib and will cause a compiler error.
2023-08-02Add mailmap (#3043)Ellie Hermaszewska
2023-08-01Fix literals needing cast (#3039)jsmall-nvidia
* Cast integer literals. * Fix expected output. * For CUDA, search global instructions to see what types are used. Improve lookup for fp16 header in CUDA. * Fix issue with f16tof32 * Small improvement around finding used base types.
2023-08-01Update footprint-queries.mdjsmall-nvidia
2023-08-01Generalize collectInductionValues (#3031)Ellie Hermaszewska
* Generalize collectInductionValues * Support affine transformations of loop index as induction variables * Test for generalized induction value collection * Neaten inductive variable finding * Store the type of implication success when finding inductive variables * Test that loop induction finding does not alway succeed * Support chains of additions and branches of additions in induction variable finding * Use c++17 for downstream compilers
2023-07-31Fix for #elif evaluation issue (#3038)jsmall-nvidia
* A more way robust way to handle resource consumption might use multiple `kind`s on GLSL emit. * Improve method naming and some comments. * Small consistency fix. * Fix issue with #elif evaluation. * Add a test.
2023-07-27Fix push constant on global variables. (#3034)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-27Fix -fvk-u-shift not applying to global constant buffer. (#3033)Yong He
* Fix -fvk-u-shift not applying to global constant buffer. * Fix test. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-27Include NonSemanticDebugInfo when calling glslang (#3030)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-26Refactor `dmul(This, Differential)` to `dmul<T:Real>(T, Differential)` (#3029)Sai Praveen Bangaru
* Refactor `dmul(This, Differential)` to `dmul<T:Real>(T, Differential)` - Add AST synthesis support for generic containers - Refactor relevant tests * Merge dmul synthesis with dadd and dzero, and disambiguate using an enum * Fix trailing spaces
2023-07-26Fix scalar swizzle causes invalid glsl output. (#3028)Yong He
* Fix -fvk-u-shift not applying to RWStructuredBuffer on glsl output. * Add `transpose` to `ObjectToWorld4x3`. * Fix scalar swizzle causes invalid glsl output. Fixes #3026. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-26Fix -fvk-u-shift not applying to RWStructuredBuffer on glsl output. (#3027)Yong He
* Fix -fvk-u-shift not applying to RWStructuredBuffer on glsl output. * Add `transpose` to `ObjectToWorld4x3`. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-26Add glsl intrinsics for CalculateLevelOfDetail (#3023)Ellie Hermaszewska
Translates to textureQueryLod().x (with the Unclameped variant being returned in the .y component) Co-authored-by: Yong He <yonghe@outlook.com>
2023-07-26Add GatherCmp* for texture objects (#3024)Ellie Hermaszewska
The translation to GLSL is incomplete as intrinsics only exist for some combination of comparison and channel (just channel 0) Closes https://github.com/shader-slang/slang/issues/3021
2023-07-25Add slang.natjmc. (#3018)Yong He
This allows Visual Studio debugger to skip over AST visitor dispatch functions and stop directly at the `visit*` functions when stepping into a `dispatch*` call. Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-25Allow parsing more than 10 intrinsic arguments (#3014)Ellie Hermaszewska
2023-07-24Remove [__readNone] on clip. (#3016)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-21Don't error on disabled warnings when treatWarnAsErr. (#3013)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-21Add support for `-fvk-invert-y`. (#3012)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-21Add sampleCount parameter for read-only textures. (#3011)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-21Fix data-flow analysis not propagating diff property through differentiable ↵Sai Praveen Bangaru
calls (#3010) * Add test for nodiff diagnostic for non-diff call propagated through diff call * Add logic to disambiguate calls to differentiable and non-differentiable methods * Add expected results for test * Simplify test * Update slang-ir-check-differentiability.cpp * Added comments for TreatAsDifferentiableExpr flavors --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-07-21Better handling of bindings with multiple resource kind "aliases" for GLSL ↵jsmall-nvidia
emit (#3009) * A more way robust way to handle resource consumption might use multiple `kind`s on GLSL emit. * Improve method naming and some comments. * Small consistency fix.
2023-07-20Fix issue with loop elimination not working on certain side-effect-free ↵Sai Praveen Bangaru
loops (#3005) Co-authored-by: Yong He <yonghe@outlook.com>
2023-07-20Fix for vk-shift-* GLSL emit issue (#3004)jsmall-nvidia
* Handle different resource kinds that can appear via the vk-shift-* allowing some HLSL kinds in GLSL emit. * Determine the used kind for emit. * Added vk-shift-uniform-issue.slang * Use a better function name. Improve comments.
2023-07-20Add linux arm64 self-hosted CI. (#3003)Yong He
* Add linux arm64 self-hosted CI. * Update CI build script. * fix * Ignore test if FileCheck not found. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-19Limit CPU cores when running MSBuild CI (#3002)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-19Add `sampleCount` parameter for MS textures. (#3001)Yong He
* Add `sampleCount` parameter for MS textures. * Fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-19Support for vk-shift-* without explicit bindings (#3000)jsmall-nvidia
* Improvements to HLSLToVulkanLayoutOptions. * WIP vk-shift-* with HLSL like binding. Detecting clashes. * Shift example seems to be working correctly. One oddness is that "used" data is now reflected, as we only enable for D3D shader resource types. Now we use those with inferred VK mode they appear. * Implicit seems to work. * Disable inference with Sampler/CombinedTextureSampler. I guess? we could just use the HLSL texture register binding to infer. * Report overlapping ranges in diagnostic. The hlsl-to-vulkan-shift-diagnostic result might be surprising but it is correct, because u is automatically laid out so consumes DescriptorSlot 0, but that's already consumed by c. * First attempt at array layout with infer on Vulkan. * Fix the vulkan shift output. * Array example.
2023-07-19Optimize specialization, and remove unnecessary calls to `simplifyIR`. (#2999)Yong He
* Remove unneccessary calls to `simplifyIR`. * fix. * Delete obsolete hoistConst pass. * Fix. * Small improvements. * Fix. * Fix enum lowering. * fix * tweaks. * tweaks. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-18nsight Aftermath crash example (#2984)jsmall-nvidia
* Small fixes and improvements around reflection tool. * Make PrettyWriter printing a class. * Aftermath crash demo WIP. * Enable aftermath in test project. * Setting failCount. * Dumping out of source maps. * Improve comments. Simplify handling of compile products. * Other small fixes to aftermath example. * Added Emit SourceLocType. Track sourcemap association meaning. Improved documentation. * Small improvements. * Capture debug information for D3D11/D3D12/Vulkan. * Enable debug info. * Small improvements. * Improve aftermath example README.md.
2023-07-18Simplify Lookup and improve compiler performance. (#2996)Yong He
* Simplify lookup. * Various bug fixes. * Report type dictionary size in perf benchmark. * Remove type duplication. * increase initial dict size. * Bug fix. * Fix bugs. * Fixup. * Revert type legalization looping. * Fix specialization pass. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-07-14Fix vk-shift-* mapping issue (#2993)jsmall-nvidia
* Fix vk-shift-* mappings. * Add some doc info about vk-shift. * Fix diagnostic test.
2023-07-14Add section on slangpy specialization (#2991)Sai Praveen Bangaru
Co-authored-by: Yong He <yonghe@outlook.com>
2023-07-14Avoid implicit casts or device transfers. (#2992)Sai Praveen Bangaru
2023-07-14Allow setting of HLSLToVulkan options without having a target specified on ↵jsmall-nvidia
the command line options. (#2989)
2023-07-14Robustness fixes around reverse-mode differentiation of variables & inout ↵Sai Praveen Bangaru
parameters (#2985) * Add a new test case for checking loop in the reverse mode * Create duplicate var for primal value to avoid inconsistent inputs to backward call Fixes an issue with inout parameters where the backprop call may use the post-call value of the var instead of the pre-call value. * `IRStore`s transpose to `IRLoad` and an `IRStore(0)` to clear differential. Fixes some subtle issues around transposing * Simplify test * Delete out-edited.hlsl --------- Co-authored-by: Lifan Wu <lifanw@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com>