c3061af | Ellie Hermaszewska | 11 July 2024, 12:51:38 UTC | Fix missing include for static slang (#4614) | 11 July 2024, 12:51:38 UTC |
45baeb3 | Ellie Hermaszewska | 11 July 2024, 11:52:54 UTC | populate slang-tag-version with cmake (#4611) At the moment it is always "unknown" | 11 July 2024, 11:52:54 UTC |
57742cb | Ellie Hermaszewska | 11 July 2024, 11:52:44 UTC | Statically link MSVC runtime (#4613) * Statically link MSVC runtime * Statically link MSVC runtime for llvm | 11 July 2024, 11:52:44 UTC |
304f9f9 | Ellie Hermaszewska | 11 July 2024, 11:52:16 UTC | More precise handing of option dependencies (#4612) | 11 July 2024, 11:52:16 UTC |
055d4ac | venkataram-nv | 11 July 2024, 06:34:44 UTC | Implement 64-bit version of clockARB (#4571) * Implement 64-bit version of clockARB * Fix capability versions * Corrections to capabilities --------- Co-authored-by: Yong He <yonghe@outlook.com> | 11 July 2024, 06:34:44 UTC |
4ae755f | Yong He | 11 July 2024, 05:41:45 UTC | Revert tag-version header removal. | 11 July 2024, 05:41:45 UTC |
ca95b93 | Yong He | 11 July 2024, 05:36:51 UTC | Revert slang-tag-version include path. | 11 July 2024, 05:36:51 UTC |
0380fca | Yong He | 11 July 2024, 05:32:00 UTC | Update badge link in. | 11 July 2024, 05:32:00 UTC |
6ed7e7f | Ellie Hermaszewska | 11 July 2024, 04:47:03 UTC | Cope with failed version parsing (#4609) * Cope with failed version parsing * Better version parsing * populate slang-tag-version with cmake * Neaten cmake | 11 July 2024, 04:47:03 UTC |
49c56d7 | Ellie Hermaszewska | 11 July 2024, 03:28:11 UTC | Make ci scripts more robust (#4608) * Remove syntax error in release script * Make ci scripts more robust * Remove lib copying * Add bin directory to RPATH | 11 July 2024, 03:28:11 UTC |
cc86174 | Yong He | 11 July 2024, 02:48:26 UTC | revert release script change. (#4607) | 11 July 2024, 02:48:26 UTC |
a190846 | Yong He | 11 July 2024, 01:52:16 UTC | release script: copy lib to bin. (#4605) | 11 July 2024, 01:52:16 UTC |
d94a748 | Yong He | 11 July 2024, 01:16:38 UTC | Fix release script. (#4604) * Fix release script. * Macos release - sign binaries. | 11 July 2024, 01:16:38 UTC |
2f70448 | Yong He | 11 July 2024, 00:18:41 UTC | Another fix in macos release script. (#4603) * Another fix in macos release script. * Fix. | 11 July 2024, 00:18:41 UTC |
c585278 | Yong He | 10 July 2024, 23:45:27 UTC | Delete unused build scripts. (#4601) * Fix macos release script. * Delete shell scripts | 10 July 2024, 23:45:27 UTC |
5006f49 | Jay Kwak | 10 July 2024, 23:18:01 UTC | Update CONTRIBUTION.md after CI side changes (#4598) * Update CONTRIBUTION.md after CI side changes * Fix a typo --------- Co-authored-by: Yong He <yonghe@outlook.com> | 10 July 2024, 23:18:01 UTC |
746d47b | Yong He | 10 July 2024, 23:17:10 UTC | Specialize address space during spirv legalization. (#4600) * Specialize address space during spirv legalization. * Fix. * Fix building doc. * Fix cmake. * Update assert. | 10 July 2024, 23:17:10 UTC |
82f308c | kaizhangNV | 10 July 2024, 21:10:33 UTC | Fix the invalid spirv generation for matrix cast (#4588) Spirv doesn't have instruction to do the float cast for the matrix type. So we have to convert the matrix row by row, and then construct them to a new matrix. Update the unit test to make sure the cast won't miss any elements. Co-authored-by: Yong He <yonghe@outlook.com> | 10 July 2024, 21:10:33 UTC |
b89421c | Yong He | 10 July 2024, 21:09:18 UTC | Add reflection API for functions. (#4587) * Add reflection API for functions. This change adds `SlangFunctionReflection` type in the reflection API that provides methods for querying function result type, parameters and user-defined attributes. `ProgramLayout::findFunctionByName` can now find a function with the given name and returns a `FunctionReflection`. `IEntryPoint` now has a `getFunctionReflection` method that returns an `FunctionReflection` for the entrypoint. * More modifiers; make reflection API consistent. | 10 July 2024, 21:09:18 UTC |
45ef0ce | Sai Praveen Bangaru | 10 July 2024, 20:49:41 UTC | Fix lowering of associated types and synthesis of dispatch functions. (#4568) * Treat global variables and parameters as non-differentiable when checking derivative data-flow Global parameters are by-default not differentiable (even if they are of a differentiable type), because our auto-diff passes do not touch anything outside of function bodies. The solution is to use wrapper objects with differentiable getter/setter methods (and we should provide a few such objects in the stdlib). Fixes: #3289 This is a potentially breaking change: User code that was previously working with global variables of a differentiable type will now throw an error (previously the gradient would be dropped without warning). The solution is to use `detach()` to keep same behavior as before or rewrite the access using differentiable getter/setter methods. * Fix issues with lookup witness lowering * Update slang-ir-lower-witness-lookup.cpp * Add tests * Update slang-ir-lower-witness-lookup.cpp * Cleanup * Update nested-assoc-types.slang --------- Co-authored-by: Yong He <yonghe@outlook.com> | 10 July 2024, 20:49:41 UTC |
16a4781 | Yong He | 10 July 2024, 20:27:10 UTC | Add user guide section on user-defined attributes. (#4557) * Add user guide section on user-defined attributes. * Update toc | 10 July 2024, 20:27:10 UTC |
ff9437e | ArielG-NV | 10 July 2024, 20:25:51 UTC | Implement non member function atomic texture support (#4544) * Implement non member function atomic texture support texture_buffer and texture1d Fixes: #4538 Related to: #4291, fixes `tests/compute/atomics-buffer.slang` Texture objects cannot use `__getMetalAtomicRef` to cast objects into atomic value type. [Texture objects mandate use of member functions](https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf#Texture%20Functions). The implementation is as follows: * We can detect texture object usage through checking for an `IRImageSubscript` Operation. `__isTextureAccess()` was added to evaluate if we have an `IRImageSubscript` operation at compile time (before `static_assert`). `__isTextureAccess()` only checks if we are targeting Metal. * We have all parameter data needed to call a texture atomic function embedded inside `IRImageSubscript`. `__extractTextureFromTextureAccess()` and `__extractCoordFromTextureAccess()` was added to extract this data for use with Metal atomics. Note: * Metal documentation has various incorrect details (function names) * Since we currently hardcode metal versions for compiling, the Metal compiler version was changed to target `Metal 3.1` (`slang-gcc-compiler-util.cpp`) * textures do not permit atomic float operations * add fallthrough attribute + fix bug with 'exchange instead of xor' + fix warning bug * incorrect function name fix * missing filecheck * disable atomics-buffer.slang compute test since GFX issue causing it to fail * Array support for metal interlockedAtomic and proper verification of texture with interlockedAtomic functions * Array support for metal interlockedAtomic * proper verification of texture with interlockedAtomic functions note: had to seperate many functions to allow forceInlining to run * missing getOperand(0) * push atomic fix for metal * fix atomic syntax for metal and hlsl emitting extra brackets (breaks tests) * test changes and meta changes 1. max is 8 rw textures with metal because Metal has this limit. Split up tests to not hit this limit 2. added back `[0]`...,`T` to test since this legalizes metal atomic intrinsic * macro'ify some of the atomic code 1. addresses review 2. makes code easier to modify in the future (rather than sifting through 1000 lines we can just look at ~10-30 * fix test 'check' * missing float support due to macro * add functions macro generates, `InternalAtomicOperationInfo` --------- Co-authored-by: Yong He <yonghe@outlook.com> | 10 July 2024, 20:25:51 UTC |
a08ccfa | ArielG-NV | 10 July 2024, 20:24:12 UTC | Fixes to Metal Input parameters and Output value input/output semantics (#4536) * initial change to test with CI for CPU/CUDA errors * Fixes to Metal Input parameters and Output values Note: 1. Flattening a struct is the process of making a struct have 0 struct/class members. Changes: 1. Separated `legalizeSystemValueParameters`. This was done to make it easier to run `legalizeSystemValue` 1 system-value at a time to simplify logic. This change is optional and can be undone if not preferred. 2. Wrap everything inside a Metal legalization context. This was done since it simplifies a lot of logic and will be required for #4375 3. Created `convertSystemValueSemanticNameToEnum` and expanded the existing System-Value Enum system. This allows (sometimes) faster comparisons and helps prepare code for porting into `slang-ir-legalize-varying-params.cpp` (#4375) 4. Added a more dynamic `legalizeSystemValue` system so more than 2 types can be targeted for legalization. This is required to legalize `output`. There is still no preference for any converted type, the first valid type will be converted to. 5. Flatten all input(`flattenInputParameters`)/output(part of `wrapReturnValueInStruct`) structs and assign semantics accordingly. 6. Semantics when legalized have no specific logic other than to: 1. avoid overlapping semantics 2. Prefer assigning explicit semantics specified by a user. 7. Fixed some issue with incorrect output semantics if not a fragment stage (when there are not any assigned semantics) * change metallib test to the correct metal test * comment code & cleanup -- Did not address all review Added comments for clarity + cleaned up some odd areas which were messy * Add comment to `fixFieldSemanticsOfFlatStruct` I found `fixFieldSemanticsOfFlatStruct` to still be confusing at a cursory glance. Added comments to make the function be more understandable. * white space * Address review comments 1. Fix semantic propegation. 2. Fix how we map struct fields of the flat struct to struct. This is specifically important for if reusing the same struct twice since struct member info is not unique per struct instance used. * Fix semantic legalization by adding TreeMap Add TreeMap to allow proper sorted-object data iteration. * Fix some compile issues * try to fix gcc compile error * compile error * fix logic bug in treeMap iterator next-semantic setter * fix vsproject filters * filter file syntax error * remove need of a context to make copies stable * Rename treemap to the more appropriate name of "treeset", adjust code comments accordingly. * remove custom type `TreeSet` and use `std::set` * remove TreeMap fully --------- Co-authored-by: Yong He <yonghe@outlook.com> | 10 July 2024, 20:24:12 UTC |
667e504 | Sai Praveen Bangaru | 10 July 2024, 20:19:06 UTC | Add `float16` support to slang-torch (#4584) | 10 July 2024, 20:19:06 UTC |
28ca743 | ArielG-NV | 10 July 2024, 19:17:06 UTC | add GL_EXT_ray_tracing_position_fetch (#4566) | 10 July 2024, 19:17:06 UTC |
59343c1 | Jay Kwak | 10 July 2024, 17:55:07 UTC | Support status argument for GatherXXX (#4490) * Support status argument for GatherXXX This commit adds an argument to all texture GatherXXX functions. The new argument is for "status" as described in SM5.0 definision. Close #4466 Limit Gather with status to HLSL Exclude Gather-status test from VK * Fix capability errors --------- Co-authored-by: Yong He <yonghe@outlook.com> | 10 July 2024, 17:55:07 UTC |
4a24724 | Sai Praveen Bangaru | 10 July 2024, 17:53:35 UTC | Various fixes around differentiable member associations `[DerivativeMember(<diff-member>)]` (#4525) * Add diagnostic for missing diff-member associations + Automatically create diff member associations if differential type is the same as the primal type. + Move diff-member attribute checking to conformance-checking phase to avoid circularity issues. Fixes #4103 * Update slang-check-decl.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com> | 10 July 2024, 17:53:35 UTC |
8ed0f49 | Yong He | 10 July 2024, 17:41:53 UTC | Emit spirv insts in the right sections. (#4590) | 10 July 2024, 17:41:53 UTC |
f4fac59 | Ellie Hermaszewska | 10 July 2024, 16:07:39 UTC | Cope with bsd coreutils on osx in release script (#4597) | 10 July 2024, 16:07:39 UTC |
5c9ce37 | Ellie Hermaszewska | 10 July 2024, 16:00:59 UTC | A couple of small fixes to cmake releases (#4596) * Correct windows file uploading * Include slang-llvm.so in releases * Neaten job names | 10 July 2024, 16:00:59 UTC |
0e56999 | Ellie Hermaszewska | 10 July 2024, 14:37:21 UTC | WIP Drop Premake (#3703) * Remove premake lua * Remove premake generated vs project * remove deps file * Remove premake driving bat files * Full test matrix under CMake * Remove premake based ci workflows * Wiggle CI * remove cmake from ci name * find frameworks correctly on osx * remove cmake from ci name * Cope with sccache not being available * cmake based falcor tests * ci wobble * only install ninja if necessary * more appropriate cache name * Remove premake from build instructions * Add some docs on ci setup * remove premake from regression tests * remove premake from perf test * Set SLANGC_PATH * ci wobble * bump slang-binaries * ci wobble * Bump spirv tools * dont use timestamp in cache * remote debug code * cache key wobble * Install sccache after building llvm * Do not build llvm tools * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * Tests spirv via glsl in ci * Define SLANG_ENABLE_XLIB=1 * osx builds on aarch64 * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * package documentation and metadata with cmake * ci wobble * Split hlsl double intrinsic tests * ci wobble * Correct type for double log10 Fixes https://github.com/shader-slang/slang/issues/4549 * remove working test from expected failures * add broken test to expected failures * smaller build for falcor tests * ci wobble * A few exclusions in ci * wip, release script * Enable examples in ci * neaten release script * Correct building docs * Only use xlib vulkan when slang_enable_xlib is true * bump slang-llvm version * Remove toolchain file use * Bump slang-llvm preset version * slash direction * Improve build directions * Add msvc cross build documentation * Disable old release files * Smaller set of releases for test * Allow not building llvm * simplify release matrix * Cross releases * formatting * formatting * ci wiggle * ci wiggle * cleaner * neaten * ci wobble * formatting * Install cross tools on linux * do not clean build dir * neaten ci * neaten ci * neaten ci * remove unused release workflow files * Build llvm on some platforms * neaten ci * notarize on osx * s/x64/x86_64 * ci wobble * Embed stdlib for release build * wobble ci * wobble ci * s/x64/x86_64 * ci wobble * ci wobble * ci wobble * vk-gl-cts on cmake * neaten ci * neaten ci * bump cache action version * Cope with windows being weird about case * old glibc version * old glibc version * Correct action file * Keep cache hot on main branch * separate small script for old glibc releases * ci wobble * ci wobble * Run cmake outside of docker * only sign on releases * Revert "Run cmake outside of docker" This reverts commit a58aaba939a4aa35fe70962fd60d9512b143592f. * python3 on build image * less parallel * ci wobble * ci wobble * ci wobble * newer git * ci wobble * ci wobble * Use newer docker image * Use newer docker image * sccache wobble * permissions issue * neaten * build llvm in ci * build llvm in ci * Remove linux clang build in ci * Only install crossbuild tools on non-aarch64 systems * neaten ci.yml * Correct github matrix * Simplify github matrix * ci wobble * Disable broken test See https://github.com/shader-slang/slang/issues/4589 * ci wobble * Neater slang-llvm archive filename * Neater path for uploading artifacts * Neater ci names * Use Windows SDK 10.0.19041.0 in cmake builds | 10 July 2024, 14:37:21 UTC |
9f1ff45 | Ellie Hermaszewska | 10 July 2024, 07:19:27 UTC | Do not unnecessarily build llvm tools (#4594) | 10 July 2024, 07:19:27 UTC |
ca0181f | Ellie Hermaszewska | 10 July 2024, 07:19:15 UTC | Do not include vk xlib headers from vulkan.h when SLANG_ENABLE_XLIB is not set (#4593) | 10 July 2024, 07:19:15 UTC |
c06cc09 | Ellie Hermaszewska | 10 July 2024, 07:18:48 UTC | Include readme and license in release files (#4595) | 10 July 2024, 07:18:48 UTC |
97bd7e6 | Ellie Hermaszewska | 10 July 2024, 07:10:25 UTC | Add individual tests for scalar double intrinsics (#4591) | 10 July 2024, 07:10:25 UTC |
cde025e | Ellie Hermaszewska | 10 July 2024, 07:09:43 UTC | Neaten filecheck output for non-passing nested-parameter-block test (#4592) With this context filecheck can generate a better error when it fails | 10 July 2024, 07:09:43 UTC |
8dd4c30 | kaizhangNV | 10 July 2024, 03:09:56 UTC | Change to use cmake in centos7 build (#4572) | 10 July 2024, 03:09:56 UTC |
0e6c5c5 | venkataram-nv | 09 July 2024, 23:18:36 UTC | Warnings for uninitialized values (#4530) This extends the code for handling uninitialized output parameters. Still needs to handle generic templates and assignment of uninitialized values more carefully. The file containing the relevant code are now in source/slang/slang-ir-use-uninitialized-values.cpp rather than the previous source/slang/slang-ir-use-uninitialized-out-param.h and the top-level function is now checkForUsingUinitializedValues. Additionally a rudimentary test shader has been added for this case, which replaces the old file for out params only; tests/diagnositcs/uninitialized-out.slang becomes tests/diagnositcs/uninitialized.slang. What this does not implement (could be future PRs): * Checking uninitialized fields within constructors * Partially uninitialized values with respect to data structure (e.g. arrays/structs/vector types) * Partially uninitialized values with respect to control flow (e.g. if/else/loop) | 09 July 2024, 23:18:36 UTC |
1caef59 | Jay Kwak | 09 July 2024, 19:45:57 UTC | Fix Lexer to recognize swizzling on an integer scalar value (#4515) * Fix Lexer to recognize swizzling on an integer scalar value Close #4413 | 09 July 2024, 19:45:57 UTC |
ddd14be | Sai Praveen Bangaru | 09 July 2024, 16:57:07 UTC | Add documentation of the type system and decorations (#4470) | 09 July 2024, 16:57:07 UTC |
2941873 | kaizhangNV | 09 July 2024, 15:58:35 UTC | Add intrinsic for clock2x32ARB (#4563) | 09 July 2024, 15:58:35 UTC |
5a174df | kaizhangNV | 09 July 2024, 04:34:51 UTC | Fix the issue in emitFloatCast (#4559) * Fix the issue in emitFloatCast In emitFloatCast function, we only considered the input type is float scalar or float vector, so if the input type is a float matrix type, it will crash. We should also handle the float matrix type. Also, we add some diagnose info to point out the source location where there is error happened, so in the future it's easier to tell us what happens. * Add a unit test * Disable the test for metal Metal doesn't support 'double'. " metal 32023.35: /tmp/unknown-YgHAsJ.metal(15): error : 'double' is not supported in Metal matrix<double,int(3),int(4)> b_0 = matrix<double,int(3),int(4)> (a_0); " | 09 July 2024, 04:34:51 UTC |
a453fad | Yong He | 09 July 2024, 02:33:51 UTC | Language server performance and document symbol fix. (#4561) | 09 July 2024, 02:33:51 UTC |
4a49769 | Sai Praveen Bangaru | 08 July 2024, 22:48:08 UTC | Treat global variables and parameters as non-differentiable when checking derivative data-flow (#4526) Global parameters are by-default not differentiable (even if they are of a differentiable type), because our auto-diff passes do not touch anything outside of function bodies. The solution is to use wrapper objects with differentiable getter/setter methods (and we should provide a few such objects in the stdlib). Fixes: #3289 This is a potentially breaking change: User code that was previously working with global variables of a differentiable type will now throw an error (previously the gradient would be dropped without warning). The solution is to use `detach()` to keep same behavior as before or rewrite the access using differentiable getter/setter methods. | 08 July 2024, 22:48:08 UTC |
2cb65a8 | ArielG-NV | 07 July 2024, 11:21:38 UTC | correctly setting launch parameters should fix the test (#4551) | 07 July 2024, 11:21:38 UTC |
65194cf | Ellie Hermaszewska | 05 July 2024, 13:09:13 UTC | Add vector overloads for or and and (#4529) * Add vector overloads for or and and Closes #4441 and #4434 * Disable cuda checks which use unsupported bool vectors * Add tests for 4531 | 05 July 2024, 13:09:13 UTC |
388de5f | Ellie Hermaszewska | 05 July 2024, 13:01:46 UTC | Correct type for double log10 (#4550) Fixes https://github.com/shader-slang/slang/issues/4549 | 05 July 2024, 13:01:46 UTC |
40a4022 | Ellie Hermaszewska | 05 July 2024, 07:05:52 UTC | Add specializations for 1 vectors in functions using the $N glsl intrinsic placement (#4534) Closes #4533 Fixes part of #4531 | 05 July 2024, 07:05:52 UTC |
42a9fce | cheneym2 | 03 July 2024, 23:25:37 UTC | Add README.md and LICENSE to binary windows and macos packages (#4535) * Add missing README and LICENSE files to packages Add README.md and LICENSE to binary windows and macos packages. Fixes issue #4117 * Update macos.yml * Update release-macos.yml * Update windows.yml | 03 July 2024, 23:25:37 UTC |
d5d03d1 | ArielG-NV | 02 July 2024, 17:35:49 UTC | Emit errors when invalid capabilities are used (#4510) * Fix invalid capabilities being allowed fixes: #4506 fixes: #4508 1. As per #4506, no longer allow invalid `[require(...)]` 2. As per #4508, no longer allow mismatch between `case` and `require` of a calling function 3. Fixes incorrect hlsl.meta capabilities 4. Added a ref to the parent function/decl for when erroring with capabilities to help debug meta.slang files for when weird source locations are generated. * rename vars and copy lambdas by value * fix some more capabilities * incorrect capabilities on a texture test * push capabilities fix note: seperated capabilities for glsl,spirv,cuda,hlsl since not all functions support all targets (source of capability error) * fix cmd line arg by using `xslang` to passthrough to slangc * let auto-infer run for certain capabilities to reduce simple mistakes --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 02 July 2024, 17:35:49 UTC |
bd01bd3 | kaizhangNV | 02 July 2024, 03:06:58 UTC | Fix the type error in kIROp_RWStructuredBufferLoad (#4523) * Fix the type error in kIROp_RWStructuredBufferLoad In StructuredBuffer::Load(), we allow any type of integer as the input. However, when emitting glsl code, StructuredBuffer::Load(index) will be translated to the subscript index of the buffer, e.g. buffer[index], however, glsl doesn't allow 64bit integer as the subscript. So the easiest fix is to convert the index to uint when emitting glsl. * Add commit | 02 July 2024, 03:06:58 UTC |
fff79c3 | venkataram-nv | 01 July 2024, 23:01:21 UTC | Support HLSL `.sample` operators for MS textures (#4524) * Add `.sample` operator for MS texture types * Adding filecheck tests for `.sample` | 01 July 2024, 23:01:21 UTC |
6262569 | venkataram-nv | 01 July 2024, 22:00:50 UTC | Supply SPIRV capability for textureQueryLod (#4522) | 01 July 2024, 22:00:50 UTC |
6e55043 | Sai Praveen Bangaru | 01 July 2024, 18:50:04 UTC | Error out when constructing tensor views from tensors with 0 stride. (#4516) This avoids a problem with broadcasted tensors. Our tensor-view platform is designed to allow unrestricted access to tensor memory, while broadcasted tensors were designed for 'read-only' use-cases. Trying to write into a broadcasted tensor needs re-allocation, which Slang is not designed to do. For now, we enforce contiguity on tensors with any 0 strides. In the future, we will introduce a ConstTensorView object to allow such tensors to be used as an input. This patch also propagates name-hint information through structs & arrays of tensors, to allow sensible names for the error messages (before this the error messages were temporary inst numbers, which is nearly impossible to debug) | 01 July 2024, 18:50:04 UTC |
0e71a6d | venkataram-nv | 01 July 2024, 17:08:04 UTC | Resource searching for examples (#4518) | 01 July 2024, 17:08:04 UTC |
d276ea3 | Jay Kwak | 01 July 2024, 16:26:53 UTC | Set debug working directory for slangc.exe (#4513) This commit changes the working directory setting in Visual Studio Debugging from "build" directory to the root of the repository. It is often the case that the users debug slang shaders under "tests" directory, and the working directory needs to be manually changed to the root directory of the repository. | 01 July 2024, 16:26:53 UTC |
15c02eb | Shannon Woods | 01 July 2024, 15:14:17 UTC | Add clearer information about how to submit a proposal document. (#4514) Bug: 4511 Author: Shannon Woods | 01 July 2024, 15:14:17 UTC |
e19e047 | Jay Kwak | 29 June 2024, 04:20:43 UTC | Parse scope for local variable declaration (#4507) When a local variable is declaraed, a scope(::) was not properly parsed for its type name. This commit fixes it. Close #4457 | 29 June 2024, 04:20:43 UTC |
88382ac | Jay Kwak | 29 June 2024, 03:38:15 UTC | Implement CheckAccessFullyMapped (#4509) * Implement CheckAccessFullyMapped Closes #4438 Closes #4445 Closes #1712 Related to #4495 This commit implements "CheckAccessFullyMapped()" for HLSL target. All of other "status" variants for Sample/Load are limited to HLSL by the capability system, because they not properly implemented yet. | 29 June 2024, 03:38:15 UTC |
048c5c3 | Jay Kwak | 29 June 2024, 02:55:42 UTC | Adding a note about the keyword, class. (#4503) Closes #4448 | 29 June 2024, 02:55:42 UTC |
ea4ebe3 | ArielG-NV | 28 June 2024, 23:44:02 UTC | Nested initialization list in struct crash fix (#4491) | 28 June 2024, 23:44:02 UTC |
0b51902 | ArielG-NV | 28 June 2024, 13:44:33 UTC | fix `WorkgroupSize()` compiler failiure (#4505) in some cases was not destroying the hoisted to global `WorkgroupSize()` function removed capability requirement on `gl_WorkGroupSize` since no longer appies (kIROp of `WorkgroupSize` is implemented for all targets) change when destroying inst | 28 June 2024, 13:44:33 UTC |
e49419b | ArielG-NV | 28 June 2024, 08:07:12 UTC | Implement HLSL resource bindings and default type `float4` to `SubpassInput<T>` (#4462) * Add case to `emitVectorReshape` for `vector<>` type, `scalar` value 1. Add new case 2. Add test * fix warning * fix warning * Implement HLSL resource bindings and default type `float4` to `SubpassInput<T>` fixes: #4440 1. Removed GLSLInputAttachmentIndexLayout modifier and the somewhat 'hacky' binding model 'Input Attachment' previously relied upon. This was changed to work with the slang-type-layout rules system. This change allows Slang automatic bindings, HLSL bindings, GLSL bindings, and translation of GLSL to and from HLSL bindings to work. 2. Added default argument `float4` to SubpassInput<T>. 3. Merged glsl.meta and hlsl.meta SubpassInput logic. * fix InputAttachment attribute checks fix InputAttachment attribute checks for HLSL and GLSL syntax * remove unused var * validate attribute correctly Attributes do not have type information. We must check the type expression to validate attribute usage. * remove hacky validation type based validation before types are fully resolved is quite hacky and unstable to changes and wrapped types * fix warning * remove redundant `!= nullptr` * remove extra `!= nullptr` * fix some warnings/errors * subpass capability to limit to dxc & remove default values in some functions * revert logic to previous logic revert logic to return if we have a binding regardless of if a VarDecl is given the binding | 28 June 2024, 08:07:12 UTC |
fd32b18 | Jay Kwak | 28 June 2024, 03:08:53 UTC | Update the coding convention document. (#4498) Put space between control-flow and `(`. This is a default formatting setting of Visual Studio 2019 and 2022. And we have been writing the code in this style for a while. | 28 June 2024, 03:08:53 UTC |
323fdff | kaizhangNV | 27 June 2024, 23:52:23 UTC | Enable upload asset for old glibc build (#4501) | 27 June 2024, 23:52:23 UTC |
f5acb6b | venkataram-nv | 27 June 2024, 23:09:33 UTC | Extend `countbits` intrinsic for vector types (#4499) * Extend `countbits` intrinsic for vector types This commit implements the overloading function for `countbits` function. Because HLSL has following overloadings, ``` uint count_bits(uint value); uint2 count_bits(uint2 value); uint3 count_bits(uint3 value); uint4 count_bits(uint4 value); ``` https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/countbits | 27 June 2024, 23:09:33 UTC |
8172751 | kaizhangNV | 27 June 2024, 21:46:54 UTC | Switch from ubuntu-18 to centos-7 for older glibc build (#4496) | 27 June 2024, 21:46:54 UTC |
b1f564b | venkataram-nv | 27 June 2024, 18:04:26 UTC | Include examples in default build (#4482) * Include examples in default build * Omit building examples on unnecessary CI workflows | 27 June 2024, 18:04:26 UTC |
5dd8f29 | ArielG-NV | 27 June 2024, 16:26:02 UTC | Cache address-space-legalization of `kIROp_Store` (#4480) * Cache address-space-legalization of `kIROp_Store` without caching we will infinetly loop re-processing the same `kIROp_Store` * uncomment tests which should now work with metal * disable gfx backend failing tests | 27 June 2024, 16:26:02 UTC |
cb61011 | skallweitNV | 27 June 2024, 15:35:17 UTC | Add API for querying dependency files on IModule (#4493) * Add API for querying dependency files on IModule * return nullptr | 27 June 2024, 15:35:17 UTC |
1d4db42 | ccummingsNV | 27 June 2024, 15:25:07 UTC | Ray tracing validation (#4418) * Ray tracing validation in Vulkan * Clean up RT validation code * Remove redundant api additions * Remove redundant debug utils callback * Ray tracing validation uses extended descriptor for initialization --------- Co-authored-by: Chris Cummings <chriscummings@nvidia.com> Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Co-authored-by: skallweitNV <64953474+skallweitNV@users.noreply.github.com> | 27 June 2024, 15:25:07 UTC |
7751963 | venkataram-nv | 27 June 2024, 14:18:02 UTC | Implement `uint2` variant of `asdouble` intrinsic (#4488) * Implement asdouble2 intrinsic and tests Fixes #4437 Adds a new asdouble2 intrinsic for all platforms except Metal. Extends the test for asdouble to test asdouble2 as well. | 27 June 2024, 14:18:02 UTC |
4dd41de | ArielG-NV | 27 June 2024, 11:53:00 UTC | Remove returned-array-legalization pass for metal (#4478) * disable return array optimization pass for metal targets fixes: #4468 | 27 June 2024, 11:53:00 UTC |
de454b0 | Jay Kwak | 26 June 2024, 15:55:54 UTC | Fix Texture2DMSArray (#4485) * Fix Texture2DMSArray Close #4427 We had the postfix order wrong for the keyword MS. This commit changes the incorrect name Texture2DArrayMS to Texture2DMSArray. | 26 June 2024, 15:55:54 UTC |
e1d0ef2 | ArielG-NV | 26 June 2024, 13:37:18 UTC | Expand upon existing `ImageSubscript` support (Metal, GLSL, SPIRV) (#4408) * Add additional `ImageSubscript` features: 1. Added ImageSubscript support for Metal & a test case * Merge GLSL/SPIRV/Metal `ImageSubscript` legalization pass 2. Added multisample support to glsl/spirv/metal for when using ImageSubscript * Added in this PR since the overhaul of the code merges together GLSL/SPIRV/Metal implementation 3. Fixed minor metal texture `Load`/`Read` bugs * [HLSL methods of access do not support subscript accessor for texture cube array](https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/texturecubearray) * removed swizzling of uint/int/float * other odd bugs which were causing compile errors note: Compute tests do not work due to what seems to be the GFX backend (causes crash without error report). The tests are disabled. * disable LOD with texture 1d seems that LOD for 1d textures need to be a compile time constant as per an error metal throws * syntax error in hlsl.meta * static_assert alone with intrinsic_asm error provides cleaner errors Note: `static_assert` seems to be unstable and not be fully respected (still require `intrinsic_asm` to avoid a stdlib compile error) * change comment to `// lod is not supported for 1D texture * add `static_assert` in related code gen paths * address review * address review * add asserts as per review comment, NOTE: unclear if these should be release 'asserts' as well | 26 June 2024, 13:37:18 UTC |
969dd4c | Jay Kwak | 26 June 2024, 05:07:41 UTC | Support atomic intrinsics for Metal (#4473) * Support atomic intrinsics for Metal This commit adds a support for the atomic intrinsics in Metal. The atomic member functions for buffers is not implemented yet. Metal requires the first argument for the atomic functions to be an atomic data type. This implementation rely on the fact that we can do a C-style type casting from a regular data type to an atomic data type. | 26 June 2024, 05:07:41 UTC |
63e0064 | ArielG-NV | 26 June 2024, 00:07:55 UTC | Fix return type address space checking. (#4465) solves: `func-resource-result-simple.slang`, related to #4291 when getting the address space of a function return we now check the return address of the inst if the return type is a non pointer type. | 26 June 2024, 00:07:55 UTC |
e2b56d0 | venkataram-nv | 25 June 2024, 22:26:51 UTC | Add intrinsic for `IsHelperLane()` in HLSL (#4471) Add InHelperLane() intrinsic for HLSL, GLSL, Metal and Spirv. | 25 June 2024, 22:26:51 UTC |
8d2f6e4 | ArielG-NV | 24 June 2024, 14:20:19 UTC | Add case to `emitVectorReshape` for when using a `vector<M, N>` type with `T` value (#4419) * Add case to `emitVectorReshape` for `vector<>` type, `scalar` value 1. Add new case 2. Add test * fix warning * fix warning | 24 June 2024, 14:20:19 UTC |
d832e33 | ArielG-NV | 24 June 2024, 13:45:21 UTC | Added float2x2 cast to float4 (and vise versa) (#4432) * added float4x4<->float4 casting (and related) Note: not adding `matrix<1,N>` and `matrix<N,1>` translations since this will bloat stdlib with many expensive to process `extension` operations. `matrix<N,1>` is already planned to be treated as vectors (which should solve this problem by proxy). * address review * explicit cast mat to vec | 24 June 2024, 13:45:21 UTC |
cf8d1ce | ArielG-NV | 24 June 2024, 13:16:28 UTC | Implementing `tbuffer` layout(s) (#4436) * Implementing `tbuffer` layouts. 1. Add to layout options 'TextureBuffer' layouts. 2. Add on to existing logic a way to allocate appropriate registers for TextureBufferType (this was made to work with parameter block logic). 3. Added asserts so objects missing a layout will gracefully crash This means `tbuffer` now works for hlsl,glsl,metal targets, spirv has yet to implement logic for `TextureBufferType`. * disable metal tests and fix emitting code a bit fixing the emitting code means metal compilation emits a useful error (help point users/developers to #4435) * fix warning | 24 June 2024, 13:16:28 UTC |
d349fd9 | kaizhangNV | 21 June 2024, 03:59:33 UTC | Add capture logic to other interfaces. (#4412) * Add capture logic to other interfaces. Add capture logics to ISession, IModule, ITypeConformance, IEntryPoint ICompositeComponentType. Add few encode methods to encode the array. Fix some capture logic in global session. We will not need to encode the null_ptr output before actual actual of the captured APIs. Previously we used this as a place holder, but it's actually not necessary, it can be detected if the output is not captured during replay. * capture/replay: dump the shader files to disk Dump the shader files to disk. Also set a default directory for the capture files. | 21 June 2024, 03:59:33 UTC |
c3c1cb6 | Jay Kwak | 20 June 2024, 14:32:48 UTC | Disambiguate int type matrix multiply (#4425) Closes #4414 | 20 June 2024, 14:32:48 UTC |
8c77887 | ArielG-NV | 19 June 2024, 00:05:29 UTC | Metal: Implement fix for non vector4 texture Load/Sample (#4417) * Metal: Implement fix for non vector4 texture Load/Sample 1. Fixes buffer-swizzle-store 2. Added test cases to texture.slang to cover all types * remove 1d lod support and buffer swizzle store this can be enabled later | 19 June 2024, 00:05:29 UTC |
93fcb83 | kaizhangNV | 17 June 2024, 15:41:34 UTC | Feature/capture (#4397) * Add the function tailer for appending the output - The basic format for the capture encode is as follow: Header: 4 bytes: magic number ('H' 'E' 'A' 'D' ) 4 bytes: call id - specify the method name 8 bytes: handle id - specify 'this' pointer 8 bytes: payload size in bytes - specify the data size of parameters 8 bytes: thread id Payload: Encode for all the parameters. Tailer (optional): Tailer is an optional, it only used when the output of the method is also stored in the method. Usually it just the opaque handle allocated by slang. 4 bytes: magic number ('T' 'A' 'I' 'L') 4 bytes: payload size in bytes. - Fix some issues in checking the result of write of output stream. * Encoding methods of IGlobalSession Add encoding logic for all the member functions of IGlobalSession, except those query functions that do not impact the internal state of slang. Because some get functions will invoke allocations by slang, these functions are account for the "query functions". Therefore those functions are still captured. All the allocations are stored by using their address, because those allocations are opaque and will finally be used as inputs for other APIs, there is no need to store the data. We just need to track those address and know which APIs will consume them. * Add SLANG_CAPTURE_CHECK macro Add SLANG_CAPTURE_CHECK macro to check SLANG_OK is returned. * Fix build error | 17 June 2024, 15:41:34 UTC |
f6b3ba8 | gan_ | 17 June 2024, 15:14:39 UTC | Fixed gl_LocalInvocationIndex being uvec3 instead of uint (#4403) | 17 June 2024, 15:14:39 UTC |
c00f461 | ArielG-NV | 14 June 2024, 22:50:00 UTC | remove inline that crashes old glibc version (#4398) | 14 June 2024, 22:50:00 UTC |
fdef653 | ArielG-NV | 14 June 2024, 16:56:59 UTC | Improve Direct SPIRV Backend Test Coverage (#4396) 'raytracing' and 'texture-footprint' tests fixed texture-footprint bug changed when we emit raytracing/rayquery extensions with glsl backend (to reduce incorrect extension emitting) | 14 June 2024, 16:56:59 UTC |
33e81a0 | Yong He | 14 June 2024, 07:56:52 UTC | [Metal] Fix global constant array emit. (#4392) * [Metal] Fix global constant array emit. * Try enable more tests. | 14 June 2024, 07:56:52 UTC |
a38a4fb | Yong He | 14 June 2024, 07:06:00 UTC | Make unknown attributes a warning instead of an error. (#4391) | 14 June 2024, 07:06:00 UTC |
a210091 | Yong He | 14 June 2024, 06:57:14 UTC | [Metal] Support SV_TargetN. (#4390) * [Metal] Support SV_TargetN. * Fix. | 14 June 2024, 06:57:14 UTC |
2cc9690 | ArielG-NV | 14 June 2024, 05:29:35 UTC | Implement for metal `SV_GroupIndex` (#4385) * Implement for metal `SV_GroupIndex` 1. If we don't have `sv_GroupThreadId` available we create one using `SV_GroupIndex`s location data. 2. We emit code emulating `sv_GroupThreadId` from the same logic that CUDA/CPP uses. * address most review comments Addressed all but two: [1](https://github.com/shader-slang/slang/pull/4385#discussion_r1639058473) and [2](https://github.com/shader-slang/slang/pull/4385#issuecomment-2166934855) I want to enable tests and be sure there is no bugs using CI before I redesign the code so I have a working fallback. * address comment, enable tests enable now functioning tests due to `SV_GroupIndex` working with metal * syntax error with groupThreadID search did `= param` instead of `= i.param` * add `sv_groupid` for test + test fixes * disable test that won't work regardless | 14 June 2024, 05:29:35 UTC |
a6b8348 | ArielG-NV | 14 June 2024, 03:17:25 UTC | fix the clang/gcc warning (#4382) * fix the clang/gcc warning * use macro for maybe unused * (code style) macro to start of function --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 14 June 2024, 03:17:25 UTC |
cfef0c6 | Yong He | 13 June 2024, 23:29:58 UTC | Metal: misc fixes and enable more tests. (#4374) * Fix and enable tests for metal. * Fix. * Fix. * Fix tests. * Fix warnings. * Fix. --------- Co-authored-by: Yong He <yonghe@Yongs-Mac-mini.local> | 13 June 2024, 23:29:58 UTC |
2407966 | ArielG-NV | 13 June 2024, 23:12:42 UTC | SPIR-V `SV_InstanceId` support in pixel shader (#4368) * solve issue by making 'non SV for SPIRV' system semantics, no longer an SV once diagnosed by slang Problem: 1. SV_InstanceID (HLSL) is allowed as an output semantic with HLSL, it is also allowed for input into pixel shader. We need to account for multiple entry points in 1 file using both of these scenarios at once. 2. SPIRV does not allow `SV_InstanceID` as a builtin, `SV_InstanceID` must be passed as a regular `flat` `Input` from vertex shader. Solution: Slang needs to treat these SV objects as non built-in's. As a result: 1. Slang needs to allocate for vertex output and fragment Input binding slots for all SV_InstanceID uses (if the target is SPIRV). This allows Slang to prepare an open slot to bind these SV objects to. 2. Slang needs to not emit built in modifier for these not actual built in variables (under the specific circumstances described). note: `VarLayout` was made not `HOISTABLE` since I don't believe it needs to be `HOISTABLE`. * The code can be made to work even if `VarLayout` is `HOISTABLE`. * fix compile warnings * address review comments and reimplement operand removal 1. remove an operand by selectively copying operands 2. test to ensure `Flat` is in the test shaders * we do not need to manually add `Flat` in the code since this is done for us in emit-spirv. This is the behavior since `uint` on a fragment `Input` must be `Flat`, else it is a VK validation error. * address review remove clone logic * address review remove unused function reserve instead of setCount with ShortList | 13 June 2024, 23:12:42 UTC |
fba316f | Sai Praveen Bangaru | 13 June 2024, 21:30:16 UTC | Remove `IRHLSLExportDecoration` and `IRKeepAliveDecoration` for non-CUDA/Torch targets (#4364) * Remove `IRHLSLExportDecoration` and `IRKeepAliveDecoration` for non-CUDA/Torch targets * Update hlsl-torch-cross-compile.slang | 13 June 2024, 21:30:16 UTC |
f0d40ad | kaizhangNV | 13 June 2024, 20:02:12 UTC | capture/replay: implement infrastructure for capture (#4372) * Define api call ID for each being captured methods * Add parameter encoder interface * Add outputStream and capture manager Add infrastructure for output stream This is the interface to record the method and parameter, and also provide functionality to write all the serialized data into file. Add capture manager: Capture manager is associated to global session object, it will provide the functionality to actual record all the APIs. Implement some of parameter encoder functions. * Fix some Windows & cmake build error * remove unused headers | 13 June 2024, 20:02:12 UTC |
ecc6ecb | ArielG-NV | 13 June 2024, 18:54:58 UTC | Fix cuda/cpp/metal crash for when using GLSL style shader inputs (#4378) Decorations were not expected as an input, this causes a crash. | 13 June 2024, 18:54:58 UTC |
0bf0bf7 | Jay Kwak | 13 June 2024, 06:06:11 UTC | Implement Sampler2D for CPP target (#4371) Closes #4267 Co-authored-by: Yong He <yonghe@outlook.com> | 13 June 2024, 06:06:11 UTC |
b970b88 | Yong He | 12 June 2024, 22:06:29 UTC | Enable full test on macos. (#4327) * Enable full test on macos. * Add failing test to expected list. * Fix CI script. * Update expected failure list. * Update test list. | 12 June 2024, 22:06:29 UTC |