https://github.com/shader-slang/slang

sort by:
Revision Author Date Message Commit Date
641f7bd Loop inversion: Handle case where loop can have additional inner breaks (#3178) * Loop inversion: Handle case where loop can have additional inner breaks - We now have another critical-edge-breaking block `e4` that is the target of inner breaks. - Both `e4` and `e1` (the break branch from the loop condition) branch to the loop's ne break block `b2`. - `b2` is a clone of the old break block `b`, and it simply branches to the old break block. This fixes an IR validation issue in `tests/autodiff/reverse-while-loop-2.slang` * Delete region-wave-masks.slang --------- Co-authored-by: Yong He <yonghe@outlook.com> 03 September 2023, 19:57:15 UTC
1d4b5b6 Proper lowering of functiosn that returns NonCopyable values. (#3179) * Proper lowering of functiosn that returns NonCopyable values. * Fix tests. * Fix clang errors. * Fix. * Fix clang error. --------- Co-authored-by: Yong He <yhe@nvidia.com> 03 September 2023, 19:56:31 UTC
355bb42 Fix github ci. (#3177) Co-authored-by: Yong He <yhe@nvidia.com> 01 September 2023, 18:11:58 UTC
d1f7e40 Fix CI related issues. (#3175) Co-authored-by: Yong He <yhe@nvidia.com> 01 September 2023, 09:12:49 UTC
9c11a87 Fix GLSL code gen around RayQuery and HitObject types. (#3173) * Update slang-llvm. * Fix. * fix. * Fix unit tests for multi-thread execution. * Fix tests. * fixes. * update tests. * Add gfx-smoke to linux expected failure list. * Try fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com> 01 September 2023, 08:25:31 UTC
b7d1933 Inline all RayQuery/HitObject typed functions when targeting GLSL. (#3172) * Inline all RayQuery/HitObject typed functions when targeting GLSL. * update test. --------- Co-authored-by: Yong He <yhe@nvidia.com> 31 August 2023, 22:02:16 UTC
cc412af Add SPIRV atomics intrinsics and fix buffer layout lowering. (#3170) * Fix atomics intrinsics and buffer layout lowering. * Fix. * Add more test. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 31 August 2023, 20:49:40 UTC
1996785 Bottleneck `TypeCastIntVal` creation through ASTBuilder (#3171) * Bottleneck type-cast-int-val creation through ASTBuilder * Update slang-ast-builder.h 31 August 2023, 18:30:35 UTC
0fee59a Remove redundant define form synchapi emulation (#3169) 31 August 2023, 09:41:28 UTC
293153e Fix typo in intrinsic for `WaveActiveMin()` (#3167) 31 August 2023, 00:59:15 UTC
4261185 Fix subtle corner-case with vars getting hoisted out of the loop creating unnecessary loop state (#3165) * Extend the unit tests for MxLayeredMaterial * Add breaking loop test * Fix subtle corner-case with vars getting hoisted out of the loop creating unnecessary loop state * remove whitespace changes * Create loop-init.slang.expected.txt * Add filecheck tests to ensure correct loop state * Update comment --------- Co-authored-by: winmad <winmad.wlf@gmail.com> Co-authored-by: Yong He <yonghe@outlook.com> 30 August 2023, 18:59:34 UTC
bb15f5b Fix memory barrier intrinsics. (#3166) * Fix memory barrier intrinsics. Makes them produce the same spirv code as dxc. * Fix. * filecheck barrier test for spirv backend. * Fix glsl intrinsic definition. * Fix intrinsics. * Fix intrinsics. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 30 August 2023, 18:45:47 UTC
019f702 Wave intrinsics. (#3164) * Wave intrinsics. * scalar intrinsics. --------- Co-authored-by: Yong He <yhe@nvidia.com> 29 August 2023, 23:43:25 UTC
f3ecf97 Correct parsing spirv with no rhs operands (#3161) * Correct parsing spirv with no rhs operands * Guard against eof 29 August 2023, 12:58:44 UTC
9d4e044 Add more wave intrinsics. (#3162) Co-authored-by: Yong He <yhe@nvidia.com> 29 August 2023, 12:55:49 UTC
b8fcb58 clock intrinsics for spirv (#3159) 29 August 2023, 07:31:31 UTC
1b9c3ea Avoid empty lines when not finding a render api (#3160) 29 August 2023, 07:31:05 UTC
0da1e69 Fix cast, needs to be PtrTypeBase rather than PtrType such that InOut/Out work. (#3158) Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com> Co-authored-by: Yong He <yonghe@outlook.com> 29 August 2023, 04:41:33 UTC
c787c4b Add `target_switch` and `intrinsic_asm` statement. (#3154) * Add `target_switch` and `__intrinsic_asm` statement. * Cleanup. * WaveGetActiveMask, WaveGetActiveMask, WaveCountBits. * WaveIsFirstLane. * More wave intrinsics. * wave intrinsics. * merge fix. * Fix. * Fix. * Update test. * update test. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 29 August 2023, 04:24:49 UTC
af363c0 s/depreciated/deprecated/ (#3153) 29 August 2023, 03:26:27 UTC
508dc3a Allow bitwise or expressions and numeric literals in spirv_asm blocks (#3157) * Add -spirv-core-grammar option to load alternate spirv defs Also embed a version to use by default * Use perfect hash for spv op lookup * Neaten perfect hash embedding * Refactor spirv grammar lookup in preperation for more kinds of lookups * Load spirv capability list from spec * Add all SPIR-V enums to lookup table * regenerate vs projects * appease msvc * Use string slices for spir-v core grammar lookups * wiggle * comment * Add OpInfo for spv ops * regenerate vs projects * Embed op names * Add min/max operand counts and enum categories to spirv info * neaten * Operand kinds for spirv ops * Store and embed all information relating to spirv enums and qualifiers * Use SPIR-V spec to position instructions in spirv_asm blocks * Neaten spir-v info embedding * Neaten perfect hash embedding * Add assignment syntax to spirv_asm snippets * Better errors for spirv_asm parser * Add warning for too many operands in spirv asm * squash warnings * neaten * test wiggle * Lookup enums for spirv * Put OpCapability and OpExtension in the correct place for spirv_asm blocks * Tests for OpCapability and OpExtension * ci wiggle * Add expected failure * Allow raising immediate values to constant ids where necessary in spirv_asm blocks * Allow bitwise or expressions and numeric literals in spirv_asm blocks * test numeric literals * Fix memory issues. * fix. --------- Co-authored-by: Yong He <yonghe@outlook.com> 28 August 2023, 22:05:26 UTC
06f7ef3 Fix various issues with trivial loops (#3149) * Fix issue with trivial loop detection * Fix issue with unreachable blocks in break elimination Add logic to avoid eliminating loops with multi-level breaks. * Incorporate feedback - Use a boolean for multi-level break check - Use dominator trees for region check instead of exhaustive enumeration - Fix potential issue with enumerating parent break blocks. * fix 25 August 2023, 18:53:12 UTC
ef4c9f1 Initial version of spirv_asm block (#3151) * Initial version of spirv_asm block * Correct indentation of parent instruction dumping * neater dumping for spirv_asm instructions * Add $$ DollarDollar token * Allow passing addresses to spirv_asm blocks * spirv OpUndef * String literals in spirv asm * OpName for spirv_asm ids * Correct failure in lower spirv_asm * correct position for spirv_asm idents * comment correct * several more tests for spirv_asm blocks * Fill out some unimplemented functions for spirv_asm expressions --------- Co-authored-by: Yong He <yonghe@outlook.com> 25 August 2023, 17:42:34 UTC
036abc8 Support SPIRV Capability declaration on intrinsic functions. (#3150) * Spirv Capability lookup. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 25 August 2023, 15:49:02 UTC
0470ea0 Misc. SPIRV Fixes, Part 2. (#3147) * Misc. SPIRV Fixes, Part 2. * Fix up. * Fix. * Add system smenatic values. * 16 bit int and floats, matrix/vector reshape, bool ops. * Fix. * Fix. * Allow push constant entry point params. * entrypoint params. * swizzleSet and swizzledStore. * packoffset. * string hash. * Fix. * Matrix arithmetics. --------- Co-authored-by: Yong He <yhe@nvidia.com> 24 August 2023, 23:32:33 UTC
c515bf9 Misc. SPIRV Fixes. (#3146) * Lower all ByteAddressBuffer uses for SPIRV. * Misc. SPIRV Fixes. --------- Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com> 23 August 2023, 13:58:50 UTC
6437c38 Lower all ByteAddressBuffer uses for SPIRV. (#3143) Co-authored-by: Yong He <yhe@nvidia.com> 23 August 2023, 12:49:33 UTC
cdd5e66 Retain int casts when unifying generic params (#3145) 23 August 2023, 09:29:25 UTC
036a2b7 Make `-fvk-u-shift` work on AppendStructuredBuffer. (#3144) Co-authored-by: Yong He <yhe@nvidia.com> 23 August 2023, 06:21:50 UTC
e2e10fb Add test case for RayQuery parameter. (#3140) * Add test case for RayQuery parameter. * Update expeccted failure. --------- Co-authored-by: Yong He <yhe@nvidia.com> 22 August 2023, 18:07:53 UTC
9d7c9b9 color spirv-val output (#3132) * s/invalid code/todo * comment debug disassembled spirv * more convenient spirv-val output * color spirv-val output 22 August 2023, 04:10:10 UTC
bd6dbaf Compile append and consume structured buffers to glsl. (#3142) * Compile append and consume structured buffers to glsl. * Fix. * Update CI config. --------- Co-authored-by: Yong He <yhe@nvidia.com> 22 August 2023, 00:07:34 UTC
f94b2f7 Allow loop counters to be used as constexpr arguments. (#3139) * Allow loop counters to be used as constexpr arguments. * Fix. * Fix. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 18 August 2023, 19:48:46 UTC
4de3d9b Bail out of infinite timeouts in our posix synchapi emulation (#3129) This can happen if vkd3d-proton triggered a VK_DEVICE_LOST 18 August 2023, 04:39:33 UTC
8a292cf SPIRV: Fix matrix layout tests. (#3137) * SPIRV: Fix matrix layout tests. * Remove spaces. * Disable debug output. * Fix. * Update expected-failure list. --------- Co-authored-by: Yong He <yhe@nvidia.com> 18 August 2023, 04:39:16 UTC
80c8f13 Be more careful about merge blocks during loop inversion (#3136) * fix block eater * Be more careful about merge blocks during loop inversion * Restrict loop inversion to loops without continue jumps * Remove multiple back-edges from loops for SPIR-V * Wiggle cross compile test output * Make loop-inversion more conservative * Allow loops on false side in cfg normalization * Do not set loop continue block during inversion * Add loop inversion test to failing test list for spirv * Simplify single use continue blocks in spirv legalization * wobble expected failure list --------- Co-authored-by: Yong He <yonghe@outlook.com> 17 August 2023, 21:57:57 UTC
a0a9c04 Update README.md 17 August 2023, 20:12:51 UTC
efe20a3 Update README.md 17 August 2023, 20:12:10 UTC
945409c Initial support for differentiating existential types (#3111) * Merge * WIP: Complete auto-diff logic for existential types * Revert "Add compiler option for generating representative hash" This reverts commit 13b09ef4621e73844c96d64d9c111a8ed0d45aae. * More fixes for fwd-mode AD on existential types * Add anyValueSize inference pass * Fix checking of `Differential.Differential==Differential` * In-progress: infer any-value-size for existential types * Existentials now work in forward-mode * Overhaul handling of existential AD types. Fwd-mode works, reverse-mode requires front-end changes * Reverse-mode now works on existentials * Cleanup * Remove diff rules for create existential object for now * Revert treat-as-differentiable changes * Fixes * More fixes * Cleanup * more cleanup * signed/unsigned * Revert "Cleanup" This reverts commit e4f7d71f07bb207736f90708961eeecd09a1b652. * Cleanup (again) * Remove public/export/keep-alive on null differential after AD pass * Minor fix * Update dictionary accessors * Keep export decoration * More fixes + Support for `kIROp_PackAnyValue` * Merge upstream * Update expected-failure.txt 17 August 2023, 18:45:13 UTC
216fc18 Create storage types of different layouts for SPIRV emit. (#3116) * Create storage types of different layouts for SPIRV emit. * Fix. * Fix. * Fix. * Update expected failure list. --------- Co-authored-by: Yong He <yhe@nvidia.com> 17 August 2023, 05:47:35 UTC
a0ee2bf Add loop inversion pass (#2899) * Generalize collectInductionValues * Support affine transformations of loop index as induction variables * Test for generalized induction value collection * Neaten inductive variable finding * Make types more specific * Add loop inversion pass * Test output changes after loop inversion * 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 * Wiggle expected output for cross compile test after loop inversion * Add loop inversion test * Simplify IfElse instructions with a single trivial block * Invert loops with a user inserted break * Limit loop inversion to loops with a 4 instruction or less comparison block * regenerate vs projects 17 August 2023, 05:41:49 UTC
3e41d69 Run vk tests on spirv backend with expected failure list. (#3128) 17 August 2023, 02:01:39 UTC
eaeb7cf Correct check for empty target flags (#3115) Co-authored-by: Yong He <yonghe@outlook.com> 16 August 2023, 19:38:49 UTC
6bdd19d Simplify IfElse instructions with a single trivial block (#3114) 16 August 2023, 19:38:22 UTC
00e2bf1 squash warnings (#3113) * Remove unused variables * Silence gcc out of bounds warnings * Squash strict-aliasing warnings It is still a naughty thing to be casting to T like this though * Correct equality check when val is nullptr --------- Co-authored-by: Yong He <yonghe@outlook.com> 16 August 2023, 05:27:00 UTC
9ec30a1 Remove -use-glsl-matrix-layout-modifier from test (#3104) Co-authored-by: Yong He <yonghe@outlook.com> 16 August 2023, 05:26:09 UTC
c16f711 SPIRV: debug source and debug line. (#3109) 16 August 2023, 03:55:21 UTC
0c366bc Fix a bug that warning 39001 can't be fully disabled. (#3112) Co-authored-by: Yong He <yhe@nvidia.com> 16 August 2023, 03:30:01 UTC
45d9961 Use ankerl/unordered_dense as a hashmap implementation (#3036) * Correct namespace for getClockFrequency * missing const * Add missing assignment operator * Remove unused variables * Return correct modified variable * Use stable hash code for file system identity * terse static_assert * Structured binding for map iteration * Make (==) and getHashCode const on many structs * Add ConstIterator for LinkedList * Replace uses of ItemProxy::getValue with Dictionary::at * Extract list of loads from gradientsMap before updating it * Const correctness in type layout * Add unordered_dense hashmap submodule * Use wyhash or getHashCode in slang-hash.h * refactor slang-hash.h * Use ankerl/unordered_dense as a hashmap implementation Notable changes: - The subscript operator returns a reference directly to the value, rather than a lazy ItemProxy (pair of dict pointer and key) slang-profile time (95% over 10 runs): - Before: 6.3913906 (±0.0746) - After: 5.9276123 (±0.0964) * 64 bit hash for strings So they have the same hash as char buffers with the same contents * Narrowing warnings for gcc to match msvc * revert back to c++17 * Correct c++ version for msvc * Use path to unordered_dense which keeps tests happy * Do not assign to and read from map in same expression * Remove redundant map operations in primal-hoist * Split out stable hash functions into slang-stable-hash.h * 64 bit hash by default * regenerate vs projects * Correct return type from HashSetBase::getCount() * correct width for call to Dictionary::reserve * Use stable hash for obfuscated module ids * Signed int for reserve * clearer variable naming * Parameterize Dictionary on hash and equality functors * Allow heterogenous lookup for Dictionary * missing const * Use set over operator[] in some places * Remove unused function * s/at/getValue 16 August 2023, 00:57:47 UTC
e34b005 Fix ByteAddressBuffer array legalization. (#3106) Co-authored-by: Yong He <yhe@nvidia.com> 15 August 2023, 20:01:31 UTC
134f27d Disable strict aliasing for gcc (#3105) Co-authored-by: Yong He <yonghe@outlook.com> 15 August 2023, 20:01:11 UTC
3d75525 Fix bug with overload resolution under nested generics (#3107) * Add test for generic param inference bug for nested generics * Change description & simplify test * Add expected file * Check parent decl before unifying type parameters 15 August 2023, 19:24:18 UTC
00bd481 SPIR-V WIP (#3064) * Add type layout for structured buffer * Default to generating spirv directly * vk test for compute simple * Add spirv-dis as a downstream compiler * Emit Array types in SPIR-V * makevector for spirv * Dump whole spirv module on validation failure * register array types todo, use emitTypeInst * Neater formatting for unhandled inst printing * break out emitCompositeConstruct * Correct array type generation * neaten * Allow getElement for vector * Remove unused * Allow predicating target intrinsics on types * Consider functions with intrinsics to have definitions We need to specialize these if they are predicated on types * Correct array type generation * makeArray for spir-v * replace getElement with getElementPtr for spirv * Correct translation of field access for spirv * Push layouts to types for spirv * Spirv intrinsics * operator now makes a pointer * Add structured buffer of struct test * Preserve type layout in spirv structured buffer legalization * neaten * makeVectorFromScalar for SPIRV * placeholder for layouts on param groups * More type safe spirv op construction * Know that constants and types only go in one section * Remove emitTypeInst * Add todo for spirv sampling * Add links to spirv documentation on emit functions * OpTypeImage support for SPIR-V * Add simpler texture test for spirv * s/spirv_direct/spirv/g * Allow several string literals in target_intrinsic * Handle global params without a var layour for SPIR-V For example groupshared vars * uint spirv asm type * Add todo for isDefinition It is currently too broad * Some atomic op spirv intrinsics * Strip ConstantBuffer wrappers for spirv * Add todo for matrix annotations * Do not associate decorations insts with spirv counterparts * Correct entry point parameter generation * Spelling * Assert that fieldAddress is returning a pointer * Add error for existential type layout getting to spir-v emit * Add IRTupleTypeLayout Unused so far * Allow getElementPtr to work with vectors * Correct target name in test * Hide default spirv direct behind a premake option --default-spirv-direct=true * Do not insert space at start of intrinsic def * Correct asm rendering in tests * remove redundant option * Emit directly from direct test * Add source language options for spirv-dis * Add comments to spirv dis * Add dead debug print for before spirv module * Correct asm rendering in tests * s/spirv_direct/spirv/g * Only specialize intrinsic functions with predicates * regenerate vs projects * squash warnings * squash warnings * remove duplication * Silence warnings from msvc * squash warnings * Overload for zero sized array * More msvc warnings * warnings * Add spirv-tools to path for tests * Do not be specific about dxc version for diag test * Normalize line endings from spirv-dis * Correct filecheck matches * Temporarily disable two spirv tests Failing on CI, undebuggable hang :/ * Do not emit storage class more than once for spirv snippet * Do not pass spir-v to spirv-dis by stdin * Do not get spirv-dis output via stream, use file * normalize file endings in spirv-dis output 15 August 2023, 12:28:42 UTC
113a257 Add auto-diff support for `IRSwizzleStore` (#3102) * Add auto-diff support for `IRSwizzleStore` - Lower IRSwizzleStore to multiple stores during AD preprocess. - Fix typo in `transcribeNonDiffInst` * Remove unnecessary file & add more robust check for 'local' addresses * Fix. * Update slang-ir-autodiff-fwd.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com> 15 August 2023, 04:47:43 UTC
b05b126 Update target-deps.json (#3103) * Update target-deps.json Update glslang binaries. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 15 August 2023, 00:58:29 UTC
661d619 Support per field matrix layout (#3101) * Support per field matrix layout * Fix warnings. * Fix. * Fix tests. * Fix spiv gen. * Fix. * More test fixes. * Fix. * Run only GPU tests on self-hosted servers. * Remove -use-glsl-matrix-layout-modifier. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 14 August 2023, 23:23:19 UTC
0403e05 Fix issue with nested loop unrolling (#3100) * Do not eliminate single-iter-loops that have inner loops using their break label. * Add test * Delete out-old.hlsl * Update slang-ir-autodiff-cfg-norm.cpp * Fix whitespace 14 August 2023, 07:23:32 UTC
e689d5e Make sure glsl source in spirv is included when compiling with -g3 (#3099) * Make sure glsl source in spirv is included when compiling with -g3. * Exclude vulkan tests on github linux CI. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 11 August 2023, 20:11:15 UTC
3722316 Add scalar version of `distance`. (#3096) 11 August 2023, 00:30:05 UTC
7691128 Upgrade to glslang 12.3.1 (#3095) Co-authored-by: Yong He <yhe@nvidia.com> 10 August 2023, 23:44:06 UTC
756fdb4 Fix `Texture2D.Load()` with offset. (#3094) Co-authored-by: Yong He <yhe@nvidia.com> 10 August 2023, 21:59:05 UTC
38b0af3 Add support for ConstBufferPointer on Vulkan. (#3089) * Add support for `ConstBufferPointer` on Vulkan. * Add spv compilation test. * Fix. * Fix code review issues. --------- Co-authored-by: Yong He <yhe@nvidia.com> 10 August 2023, 21:58:41 UTC
60ebada Allow member lookup through modified type. (#3091) * Allow member lookup through modified type. * Disable `lockFileSync` test. --------- Co-authored-by: Yong He <yhe@nvidia.com> 10 August 2023, 20:19:37 UTC
d4e72a9 Support nested structs in function bodies. (#3078) 10 August 2023, 04:52:13 UTC
f875d3f Support implciit casted swizzled lvalue. (#3077) * Support implciit casted swizzled lvalue. * Fix warnings. * Fix. * fix comment. * Prefer mangled linkage name for global params. * Update tests. --------- Co-authored-by: Yong He <yhe@nvidia.com> 10 August 2023, 03:11:09 UTC
03a5bb4 Various fixes in GLSL emit. (#3074) * Fix name mangling of modified types. * Add `InterlockedAdd(__ref uint, int)` overload. * Fix. * Fix type error in ImageStore legalization. --------- Co-authored-by: Yong He <yhe@nvidia.com> 09 August 2023, 17:54:41 UTC
c4615fe Clean up and improve Val deduplication performance. (#3069) * Clean up and improve Val deuplication performance. * Fix. * Fix. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 09 August 2023, 16:11:23 UTC
793a29a Set Full GPU CI timeout to 100 minutes. (#3070) Co-authored-by: Yong He <yhe@nvidia.com> 08 August 2023, 20:55:39 UTC
ea1f165 Support `-fvk-use-gl-layout` for ByteAddressBuffer load/store. (#3068) * Support `-fvk-use-gl-layout` for ByteAddressBuffer load/store. * Fix. * Fix. * Add test for unaligned load. --------- Co-authored-by: Yong He <yhe@nvidia.com> 08 August 2023, 20:54:05 UTC
0b2d753 Add warning on mutation of function parameter (#3067) By default, function parameters in HLSL are mutable, but any changes to a parameter do not affect the values of the arguments after a call: void f(int a) { a++; // allowed, but kind of useless } ... int b = 0; f(b); // b is still zero Because the above behavior is a part of HLSL, we cannot easily diagnose such cases as errors without breaking backward compatibility with existing code. This change makes it an error to invoke a `[mutating]` method on a function parameter, which cannot affect backward compatibility since the notion of `[mutating]` methods is not present in existing HLSL code: struct Counter { int _state; [mutating] void increment() { _state++; } } void f(Counter a) { a.increment(); // ERROR } ... Counter b = { 0 }; f(b); // b is still zero The compiler will also diagnose calls to `[mutating]` methods on a field or array element extracted out of a function parameter. This change does not affect code that directly mutates a function parameter via assignment, or via passing the parameter onward as an argument to an `out` or `inout` call (or, equivalently, as the left-hand operand to a compound assignment operator). This is a breaking change to existing Slang code, since it could diagnose an error on code that used to be allowed. Indeed, two tests in the Slang test suite had to be updated to avoid such errors. It would be possible to turn this diagnostic into a warning, and simply encourage users to enable it as an error. On balance, though, it seems best to not allow this idiom since it has such a high probability to be an error. Note: the specific case that motivated this change is use of `RayQuery` values as function parameters. The root of the problem there is that dxc treats `RayQuery` values as copyable handles to mutable state, while Slang prefers to capture the mutation that occurs through marking the appropriate methods as `[mutating]`. The Slang approach makes portable codegen for D3D/Vulkan simpler, but requires that we *also* treat a type like `RayQuery` as non-copyable. This change does not address the problem that the Slang compiler does not enforce the requirement that values of non-copyable types do not get copied. Instead, the diagnostic here just happens to issue a diagnostic in one important case where a copy would typically occur. Co-authored-by: Yong He <yonghe@outlook.com> 08 August 2023, 05:23:31 UTC
97dccb4 Add spirv-dis as a downstream compiler (#3059) * Add spirv-dis as a downstream compiler * Add TODO for spirv-dis downstream compiler * Do not use SpirvDis by default * tabs to spaces * regenerate vs projects * correct test * correct calling convention --------- Co-authored-by: Yong He <yonghe@outlook.com> 08 August 2023, 05:23:06 UTC
43e0fba Default target intrinsic should not apply to SPIR-V (#3054) * Default target intrinsic should not apply to SPIR-V * CapabilitySet is a conjunction * Add TEXTUAL_SOURCE capability class 08 August 2023, 05:22:47 UTC
ae1c9d9 Fix -fvk-use-entrypoint-name. (#3066) * Fix -fvk-use-entrypoint-name. * Remove irrelevant changes. --------- Co-authored-by: Yong He <yhe@nvidia.com> 07 August 2023, 22:04:34 UTC
3a96240 Validate generated SPIR-V on output (#3061) * Validate generated SPIR-V * regenerate vs projects * Do not fail compiles if spirv-val is not available --------- Co-authored-by: Yong He <yonghe@outlook.com> 07 August 2023, 22:02:53 UTC
0e28cd0 Unify Type and Constant sections for SPIR-V (#3057) Types can depend on constants (for example fixed sized arrays) Co-authored-by: Yong He <yonghe@outlook.com> 07 August 2023, 22:02:29 UTC
03c6cda Casting and vector/scalar correct arithmetic ops for SPIR-V (#3056) * types for cast instructions * Information getting functions for int and float types * Implement spirv casting * Broadcast operands for SPIR-V arithmetic SPIR-V doesn't allow vector/sclar arithmetic ops * Simplify spirv int/float type generation --------- Co-authored-by: Yong He <yonghe@outlook.com> 07 August 2023, 22:01:55 UTC
0d803a4 Add missing header in slang-glslang (#3055) 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> 07 August 2023, 22:01:34 UTC
10b2038 Diagnostic improvements for direct spirv (#3053) * 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> 07 August 2023, 22:01:02 UTC
9eb6a84 Fix `Val` deduplication bug. (#3050) * 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> 07 August 2023, 22:00:38 UTC
9ef9cc0 Add missing empty case to Array::makeArray (#3058) 07 August 2023, 16:23:16 UTC
dceb1a7 Allow parsing some SPIR-V enums in intrinsics (#3062) * Add TokenReader::AdvanceIf overlaod for TokenType * Add some spirv defs to parser * Add comment 07 August 2023, 16:19:36 UTC
547ea5c Simplify SpvTypeInstKey (#3063) 07 August 2023, 16:19:07 UTC
846286b sv_groupindex support for spirv (#3060) 07 August 2023, 16:18:44 UTC
550396f Fail on an unhandled spv operand (#3052) Co-authored-by: Yong He <yonghe@outlook.com> 07 August 2023, 16:08:23 UTC
0f57c46 Correct return type for emitFieldAddress (#3051) 07 August 2023, 15:38:52 UTC
856086c Add option to use original entrypoint in spirv output. (#3047) * Add option to use original entrypoint in spirv output. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 04 August 2023, 22:55:06 UTC
a2d90fb Redesign `DeclRef` and systematic `Val` deduplication (#3049) * 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> 04 August 2023, 22:47:39 UTC
17da4f0 Added D3D12 RenderTargetView TextureCube case (#3048) * Added D3D12 RenderTargetView TextureCube case * Added D3D12 DepthStencilView TextureCube case --------- Co-authored-by: jsmall-nvidia <jsmall@nvidia.com> 04 August 2023, 17:30:33 UTC
7734797 Fix around texture footprint support for NVAPI. (#3046) 03 August 2023, 20:00:55 UTC
aadd816 Disable code motion for expensive insts (call & div) (#3042) * 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 03 August 2023, 18:03:51 UTC
0dcae1c Only define atomics for `float2` and `float4` when CUDA arch<900 (#3041) From Ada onwards, these definitions are already available in CUDA's stdlib and will cause a compiler error. 03 August 2023, 03:04:21 UTC
e80cd4f Add mailmap (#3043) 02 August 2023, 07:49:38 UTC
1653731 Fix literals needing cast (#3039) * 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. 01 August 2023, 19:39:28 UTC
edcc50c Update footprint-queries.md 01 August 2023, 18:19:57 UTC
c34a7b6 Generalize collectInductionValues (#3031) * 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 01 August 2023, 04:43:51 UTC
5349241 Fix for #elif evaluation issue (#3038) * 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. 31 July 2023, 19:40:29 UTC
8bfdc39 Fix push constant on global variables. (#3034) Co-authored-by: Yong He <yhe@nvidia.com> 27 July 2023, 23:58:32 UTC
04f7244 Fix -fvk-u-shift not applying to global constant buffer. (#3033) * Fix -fvk-u-shift not applying to global constant buffer. * Fix test. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 27 July 2023, 21:15:16 UTC
c1216ca Include NonSemanticDebugInfo when calling glslang (#3030) Co-authored-by: Yong He <yhe@nvidia.com> 27 July 2023, 18:40:44 UTC
ba89fc8 Refactor `dmul(This, Differential)` to `dmul<T:Real>(T, Differential)` (#3029) * 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 26 July 2023, 21:15:21 UTC
back to top