summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-22Bump spirv-tools to 9295a8b94ed0751565fa9cda6d949f5e388b32d9 (#6145)cheneym2
Pick up fix to https://github.com/shader-slang/slang/issues/5859
2025-01-22Catch all exceptions from loadModule* and link API calls. (#6143)Anders Leino
This closes #5950.
2025-01-21Fix bug: IgnoreInheritance in lookup (#6146)kaizhangNV
* Fix bug: IgnoreInheritance in lookup When specifying IgnoreInheritance in lookup, it will ignore all members in the self extension for generic, the reason is that it doesn't specialize the target type of the extension decl when comparing with self type, so it will result that every type is unequal to the target type.
2025-01-21Fix gcc downstream compiler optimization level corresponding to ↵spking11
OptimizationLevel::Maximal (#6137)
2025-01-21Generate IDs for every witness table (#6129)Julius Ikkala
Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-20Fix def-use issue from multi-level break elimination (#6134)Sai Praveen Bangaru
2025-01-18Fix upper 32 bits of 64-bit AnyValue packing (#6127)Julius Ikkala
2025-01-17Make -depfile work for binary modules output too (#6126)Julius Ikkala
2025-01-17Implement Quad Control intrinsics (#5981)Darren Wihandi
2025-01-17test-server should use d3d12core.dll from bin directory (#6095)Jay Kwak
2025-01-17Delete CNAMEKhronos Group Web Services
2025-01-17Create CNAMEKhronos Group Web Services
2025-01-17Fix circularity issue when checking multiple generic interface constraints. ↵Sai Praveen Bangaru
(#6121) * Fix circularity issue with checking multiple generic interface constraints * Create multi-generic-interface-constraint.slang * Update multi-generic-interface-constraint.slang * Update slang-check-inheritance.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-17Add diagnostic for function body followed by a `;`;. (#6122)Yong He
2025-01-17Add groupshared atomic array test. (#6107)Yong He
* Add groupshared atomic array test. * Fix test.
2025-01-17Allow __subscript<T> syntax. (#6124)Yong He
* Allow __subscript<T> syntax. * Fix.
2025-01-17Refactor _Texture to constrain on texel types. (#6115)Yong He
* Refactor _Texture to constrain on texel types. * Fix tests. * Fix. * Disable glsl texture test because rhi can't run it correctly.
2025-01-17Fix interface requirement lowering for generic accessors (#6123)Sai Praveen Bangaru
2025-01-17Avoid using the backend validation when using test server (#6094)Jay Kwak
* Avoid using the backend validation when using test server Currently with a debug build, the backend validation such as Vulkan-Validation-Layer or DXC validation is enabled all the time. It means there is a higher chance that we see warning messages while running slang-test with a debug build. However, those warning messages incorrectly treated as the testing result when using test-server. This is mainly because of the fact that the Slang implemention for the RPC commucation expects only one time output result. As soon as any warning is printed, the testing process is incorrectly considered as completed even though it might be still in the middle of initializing the device. This commit disables the backend validation when using the test-server. * format code (#31) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-17Fix nullptr in generic specialization (#6066)Julius Ikkala
* Fix nullptr in generic specialization * Fix formatting * Revert "Fix nullptr in generic specialization" and add emitPtrLit instead * Add type parameter to getPtrValue() --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-17hoist entry point params for wgsl (#6116)Darren Wihandi
Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-17Fix `-capability` arg in SPIRV debug command line output. (#6114)Yong He
2025-01-17Fix prebound parameter pack - argument list matching logic. (#6111)Yong He
* Fix prebound parameter pack - argument list matching logic. * Move tests. * Fix.
2025-01-16Move global variable initialization into entry points for WGSL (#6106)Anders Leino
* Add test that reproduces the issue in #5986 * Call moveGlobalVarInitializationToEntryPoints for WGSL as well This closes #5986. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-17Fix resource specialization issue where store insts from inlined calls are ↵Sai Praveen Bangaru
not considered properly. (#6099) * Fix resource specialization issue where stores from inlined calls are not considered. * Format
2025-01-17Fix cyclic lookups with UnscopedEnums (#6110)Julius Ikkala
* Fix cyclic lookups with UnscopedEnums * Add test with multiple unscoped enums with explicit types --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-16C-like emitter: Add parenthesis when combining relational and bitwise… (#6070)Anders Leino
* C-like emitter: Add redundant parentheses in several cases This is required since the Dawn WGSL compiler requires parentheses even though precedence rules could resolve order of operations. This closes #6005. * Fix tests/metal/byte-address-buffer The output now includes parentheses around shift expressions appearing as operands in bitwise expressions, so update the test accordingly. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-16Implement Packed Dot Product intrinsics (#6068)Darren Wihandi
* implement dot acc intrinsics * fix sm version * fix test * improve comment --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-16support SV_ViewIndex for Metal (#6103)Darren Wihandi
Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-15Fix argument buffer tier2 layout computation. (#6101)Yong He
2025-01-15Inline global constants that contains opaque handles for legalization. (#6098)Yong He
* Inline global constants that contains opaque handles for legalization. * Add diagnostics on opaque type global variables. * Fix. * Fix test.
2025-01-15Emit errors when seeing a matrix with row/col count of 1 (#6044)Anders Leino
Such matrices aren't well supported except by D3D targets. Therefore, generate an error rather than outputting invalid code for non-D3D targets. This closes #5987. Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-15Implement AnyValue marshalling for 8-bit integers (#6059)Julius Ikkala
* Implement anyvalue marshalling for 8-bit integers * Fix missing offset from int8/uint8 case * Disable anyvalue 8-bit test for DXIL Because it doesn't support 8-bit values anyway. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-15Reuse code for Metal and WGSL entry point legalization (#6063)Darren Wihandi
* Refactor to reuse common for metal and wgsl entry point legalization * refactor system val work item * refactor simplify user names * clean up fix semantic field of struct * improve code layout * split wgsl/metal to seperate classes and cleanup * remove extra includes * remove dead code comments * minor cleanup * squash merge from master and resolve conflict * apply metal spec const thread count changes * Revert "apply metal spec const thread count changes" This reverts commit c42d707fd25ee0328598650d3235cd2322810ccc. * Revert "squash merge from master and resolve conflict" This reverts commit 06db88ef7001bdfe93fb23af35af0d026b255dee. * Merge remote-tracking branch 'origin/master' * apply metal spec const thread count changes * Revert "apply metal spec const thread count changes" This reverts commit 3b9e6f53cee2e6076ac2b7a0d015a1ed2cbbd627. * Revert "Merge remote-tracking branch 'origin/master'" This reverts commit 99869d573a46dadeb24445405f5a1e37a8e03d0d. * apply metal spec const thread count changes --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-15Fix optix varying legalization. (#6089)Yong He
* Fix optix varying legalization. * Add test.
2025-01-14Fix issue with specialization using arithmetic expressions (#6084)Sai Praveen Bangaru
2025-01-14Fix documentation on DescriptorHandle. (#6062)Yong He
* Fix documentation on DescriptorHandle. * Fix. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2025-01-14Implement specialization constant support in numthreads / local_size (#5963)Julius Ikkala
* Allow using specialization constants in numthreads attribute * Add support for GLSL local_size_x_id syntax * Fix overeager specialization constant parsing * Add diagnostics for specialization constant numthreads * Remove unused variable * Fix local_size_x_id not finding existing specialization constant * Allow materializeGetWorkGroupSize to reference specialization constants * Use SpvOpExecutionModeId for modes that require it * Cleanup specialization constant numthreads code * Add tests for specialization constant work group sizes * Fix implicit Slang::Int -> int32_t cast * Fix querying thread group size in reflection API --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-14Fix #5354, change diagnostic definition error message and expect output in ↵wij
test (#6067) Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-14update slang-rhi + fix nvrtc options (#6080)Simon Kallweit
* update slang-rhi * pass --dopt=on to nvrtc when enabling debug information * fix leaks in slang-rhi * update slang-rhi * only use --dopt when available --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-14Fix inaccurate documentation in member function mutability. (#6065)Entropy Lost
* Fix inaccurate documentation in member function mutability. * Change throw to result in for specificity. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-14Fix simplify if-else (#6077)cheneym2
* Fix simplify if-else The if-else optimization observes that at if at least one true/false block is merely an unconditional jump to the after block, that the whole if-else can be replaced with a jump to the after block. But it's important to copy the phi arguments from the aforementioned unconditional jump, rather than what is present in the 'true' block, since the 'true' block might actually just be the after block itself. Below, the ifElse() would be replaced with an unconditional jump to block %39, but with the `phi` arguments copied from the branch to %29, which is an unrelated block. ifElse(%38, %39, %40, %39) block %40: unconditionalBranch(%39) block %39: unconditionalBranch(%29, 0 : Float) block %29( [nameHint("ret")] param %ret : Float): Fixes issue #5972 * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-13Don't initialize temp var for out parameters. (#6076)Sai Praveen Bangaru
2025-01-13Find OptiX headers (#6071)Simon Kallweit
* add support for finding OptiX headers * add documentation * fix linux path
2025-01-10Fix CUDA reflection for acceleration structure handle size. (#6055)Yong He
2025-01-10Fix `markNonContextParamsAsSideEffectFree`. (#6054)Yong He
2025-01-10Add overload for select to handle Optional<T> (#6022)mTvare
Fixes #6020 Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-10WGSL: Convert signed vector shift amounts to unsigned (#6023)Anders Leino
* WGSL: Fixes for signed shift amounts - Handle the case of vector shift amounts - Closes #5985 - Move handling of scalar case from emit to legalization - Add tests for bitshifts. * Move the binary operator legalization function to a common place * Metal: Legalize binary operations Closes #6029. * Fix Metal filecheck test The int shift amounts are now converted to unsigned. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-10Fix potential test failures due to SPIRV validation failure (#6047)Jay Kwak
There are a few tests that are currently passing but could fail when conditions change little bit. When slang-test runs with `test-server`, the spirv validation fails and the test gets reported as failed even though they are actually passing. To avoid the potential problem, this commit adds an empty entry point. Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-10Fix Metal type layout reflection for nested parameter blocks. (#6042)Yong He