summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-29Fix exact-match witness synthesis for static functions (#6204)Darren Wihandi
* fix non-static methods when trying to synthesize method requirement witness * add tests * update test * improve test --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-28Fix UIntSet calcSubtract to handle mismatched buffer sizes (#6205)Darren Wihandi
* fix calcSubtract on UIntSet * add test --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-28Proposal for Cooperative Vector in Slang (#6209)Jay Kwak
2025-01-28Add slangpy proposal (#6156)Yong He
* Add slangpy proposal * Fix.
2025-01-28Allow requiring glsl language extensions on structs (#6173)Ellie Hermaszewska
* Allow requiring glsl language extensions on structs * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-28Added const version for the operator[] in Matrix (#6186)Norbert Nopper
Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-28Delete invalid ASSERT in `isTypeOperandEqual`. (#6196)Yong He
2025-01-28Fix geometry shader related modifier lowering. (#6197)Yong He
* Fix geometry shader related modifier lowering. * Cleanup. * Delete obselete test. * Enable geometryShader test on windows only. * Fix test.
2025-01-28Add a unit test to cover type-conformance compilation API. (#6178)Yong He
Co-authored-by: Anders Leino <aleino@nvidia.com>
2025-01-27Add an example for reflection of parameter blocks (#6161)Theresa Foley
* Add an example for reflection of parameter blocks The example loads a shader program, compiles it for Vulkan, and then uses reflection information to set up descriptor set layouts and a pipeline layout. It then validates that the pipeline layout that is created is compatible with the compiled code, by using them together to make a pipeline state object with the validation layer enabled. The basic flow of the application follows the presentation in the companion article, and references its sections. This is example could be expanded in a few ways: * A D3D12 path could be added, to show the comparable operations for creating a root signature from reflection data * The existing shader could be modified to touch/use more of its parameter data, to help ensure that any errors would be caught by the validation layer * The set of shader files/modules that get loaded automatically could be expanded, to test more cases * The code could be expanded to handle more than just compute shaders, by allowing for multiple-entry-point files to be loaded for rasterization or ray-tracing pipelines * format code * fixup: build errors * format code * fixups for build * fixup * fixup --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-27Properly plumbing layout for global varyings. (#6198)Yong He
* Properly plumbing layout for global varyings. * Fix test.
2025-01-27Fix an incorrect iteration with a workList (#6177)Jay Kwak
* Fix an incorrect iteration with a workList We cannot modify workList while iterating it, because its type `List` is actually an array container. * Change based on the feedback * Use `Index` instead of `int` for for-loop index --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-27DNI: try using sparse checkout for MDL-SDK (#6190)kaizhangNV
2025-01-24Fix depth texture sampling on Metal. (#6168)Yong He
2025-01-25Some usability improvements to formatting script (#6153)Anders Leino
* Sharpen the requirements for formatting * Add option to only format files changed since a given revision * Avoid divison-by-zero when total is zero * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2025-01-24Add intptr_t abs/min/max operations for CPU & CUDA targets (#6160)Julius Ikkala
* Add intptr_t abs/min/max operations for CPU & CUDA targets * Define intptr_t and uintptr_t with CUDACC_RTC --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-24Add bgra8 format (#6163)Darren Wihandi
* add brga8 format * add tests * minor fixes * cleanup * maybe fix broken quad control test * add missing xslang flag on test --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-24improve error message on generic value decls (#6169)Darren Wihandi
Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-24Fix static build and install (#6158)Dario Mylonopoulos
* Add SLANG_ENABLE_RELEASE_LTO cmake option * Fix cmake static build * Disable install SlangTargets to avoid static build failing
2025-01-23Fix incorrect resolve of specialization instance (#6162)Jay Kwak
* Fix incorrect resolve of specialization instance While checking the uninitialized variables, we were not resolving the specialized instance correctly. This commit repeats the resolve while the result is a specialization instance. A new test is added for this: tests/diagnostics/uninitialized-generic.slang After the problem is fixed, it revealed another problem in existing tests: tests/compute/nested-generics2.slang tests/diagnostics/uninitialized-local-variables.slang When a struct has a member variable whose type is a generic type, we cannot iterate over its member variables yet, because the type is unknown until the generic function/struct is specialized. We will have to give up checking for these cases.
2025-01-22Cache and reuse glsl module. (#6152)Yong He
* Cache and reuse glsl module. * Fix. * Implement record/replay for the new api. * Fix record replay. * Fix test.
2025-01-22Add validation for destination of atomic operations (#6093)Anders Leino
* Reimplement the GLSL atomic* functions in terms of __intrinsic_op Many of these functions map directly to atomic IR instructions. The functions taking atomic_uint are left as they are. This helps to address #5989, since the destination pointer type validation can then be written only for the atomic IR instructions. * Add validation for atomic operations Diagnose an error if the destination of the atomic operation is not appropriate, where appropriate means it's either: - 'groupshared' - from a device buffer This closes #5989. * Add tests for GLSL atomics destination validation Attempting to use the GLSL atomic functions on destinations that are neither groupshared nor from a device buffer should fail with the following error: error 41403: cannot perform atomic operation because destination is neither groupshared nor from a device buffer. * Validate atomic operations after address space specialization Address space specialization for SPIR-V is not done as part of `linkAndOptimizeIR`, as it is for e.g. Metal, so opt out and add a separate call for SPIR-V. * Allow unchecked in/inout parameters for non-SPIRV targets * Clean up callees left without uses during address space specialziation * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-22Use SPIRV integer vector dot product instructions (#6141)Darren Wihandi
* Use SPIRV integer vector dot product instructions * fix test --------- Co-authored-by: Yong He <yonghe@outlook.com>
2025-01-22Remove unnecessary parameters from Metal entry point signature (#6131)Darren Wihandi
* fix metal entry point global params * address review comments, cleanup and test * remove dead code * undo accidental change * address review comments and cleanup * minor fix and cleanup --------- Co-authored-by: Yong He <yonghe@outlook.com>
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>