https://github.com/shader-slang/slang
- HEAD
- refs/heads/csyonghe-patch-1
- refs/heads/glsl-intrinsic-functional-test
- refs/heads/master
- refs/heads/release-debug
- refs/heads/swoods-nv-patch-1
- refs/tags/''
- refs/tags/v''
- refs/tags/v0.12.19
- refs/tags/v0.12.26
- refs/tags/v0.12.27
- refs/tags/v0.12.28
- refs/tags/v0.12.29
- refs/tags/v0.13.4
- refs/tags/v0.13.5
- refs/tags/v0.13.6
- refs/tags/v0.13.6.1
- refs/tags/v0.24.39
- refs/tags/v0.24.40
- refs/tags/v0.24.41
- refs/tags/v0.24.42
- refs/tags/v0.24.48
- refs/tags/v0.24.49
- refs/tags/v0.24.50
- refs/tags/v0.24.52
- refs/tags/v0.8.3
- refs/tags/v0.8.4
- refs/tags/v0.8.5
- refs/tags/v0.8.5-rc
- refs/tags/v0.8.6
- refs/tags/v0.8.6-rc
- refs/tags/v0.8.7
- refs/tags/v0.8.8
- refs/tags/v2023.5.5
- refs/tags/v2024.1.10
- refs/tags/v2024.1.11
- refs/tags/v2024.1.13
- refs/tags/v2024.1.15
- refs/tags/v2024.1.16
- refs/tags/v2024.1.19
- refs/tags/v2024.1.27
- refs/tags/v2024.1.28
- refs/tags/v2024.1.29
- refs/tags/v2024.1.30
- refs/tags/v2024.1.7
- refs/tags/v2024.1.9
- refs/tags/v2024.10.1-draft
- refs/tags/v2024.9
- refs/tags/v2024.9.1
- v0.18.22
- v2024.9.2
- v2024.10
- v2024.1.8
- v2024.1.6
- v2024.1.5
- v2024.1.4
- v2024.1.34
- v2024.1.33
- v2024.1.32
- v2024.1.31
- v2024.1.3
- v2024.1.26
- v2024.1.25
- v2024.1.24
- v2024.1.23
- v2024.1.22
- v2024.1.21.1
- v2024.1.21
- v2024.1.20
- v2024.1.2
- v2024.1.18
- v2024.1.17
- v2024.1.14
- v2024.1.12
- v2024.1.1
- v2024.1.0
- v2024.0.9
- v2024.0.8
- v2024.0.7
- v2024.0.6
- v2024.0.5
- v2024.0.4
- v2024.0.3
- v2024.0.2
- v2024.0.15
- v2024.0.14
- v2024.0.13
- v2024.0.12
- v2024.0.11
- v2024.0.10
- v2024.0.1
- v2024.0.0
- v2023.5.8
- v2023.5.7
- v2023.5.6
- v2023.5.4
- v2023.5.3
- v2023.5.2
- v2023.5.1
- v2023.5.0
- v2023.4.9
- v2023.4.8
- v2023.4.7
- v2023.4.6
- v2023.4.5
- v2023.4.4
- v2023.4.3
- v2023.4.2
- v2023.4.10
- v2023.4.1
- v2023.4.0
- v2023.3.9
- v2023.3.8
- v2023.3.7
- v2023.3.6
- v2023.3.5
- v2023.3.4
- v2023.3.3
- v2023.3.20
- v2023.3.2
- v2023.3.19
- v2023.3.18
- v2023.3.17
- v2023.3.16
- v2023.3.15
- v2023.3.14
- v2023.3.13
- v2023.3.12
- v2023.3.11
- v2023.3.10
- v2023.3.1
- v2023.3.0
- v2023.2.1
- v2023.2.0
- v2023.1.1
- v2023.1.0
- v2023.0.6
- v2023.0.5
- v2023.0.4
- v2023.0.3
- v2023.0.2
- v2023.0.1
- v2023.0.0
- v0.9.9
- v0.9.8
- v0.9.7
- v0.9.6
- v0.9.5
- v0.9.4
- v0.9.3
- v0.9.2
- v0.9.15
- v0.9.14
- v0.9.13
- v0.9.12
- v0.9.11
- v0.9.10
- v0.9.1
- v0.9.0
- v0.8.9
- v0.8.2
- v0.8.13
- v0.8.12
- v0.8.11
- v0.8.10
- v0.8.1
- v0.8.0
- v0.7.9
- v0.7.8
- v0.7.7
- v0.7.6
- v0.7.5
- v0.7.4
- v0.7.3
- v0.7.2
- v0.7.10
- v0.7.1
- v0.7.0
- v0.6.9
- v0.6.8
- v0.6.7
- v0.6.6
- v0.6.5
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.2
- v0.3.1
- v0.3.0
- v0.28.3
- v0.28.2
- v0.28.1
- v0.28.0
- v0.27.9
- v0.27.8
- v0.27.7
- v0.27.6
- v0.27.5
- v0.27.4
- v0.27.3
- v0.27.21
- v0.27.20
- v0.27.2
- v0.27.19
- v0.27.18
- v0.27.17
- v0.27.16
- v0.27.15
- v0.27.14
- v0.27.13
- v0.27.12
- v0.27.11
- v0.27.10
- v0.27.1
- v0.27.0
- v0.26.0
- v0.25.5
- v0.25.4
- v0.25.3
- v0.25.2
- v0.25.1
- v0.25.0
- v0.24.9
- v0.24.8
- v0.24.7
- v0.24.6
- v0.24.54
- v0.24.53
- v0.24.51
- v0.24.5
- v0.24.47
- v0.24.46
- v0.24.45
- v0.24.44
- v0.24.43
- v0.24.4-fix
- v0.24.4
- v0.24.38
- v0.24.37
- v0.24.36
- v0.24.35
- v0.24.34
- v0.24.33
- v0.24.32
- v0.24.31
- v0.24.30
- v0.24.3
- v0.24.29
- v0.24.28
- v0.24.27.1
- v0.24.27
- v0.24.26.2
- v0.24.26
- v0.24.25
- v0.24.24
- v0.24.23
- v0.24.22
- v0.24.21
- v0.24.20
- v0.24.2
- v0.24.19
- v0.24.18
- v0.24.17
- v0.24.16
- v0.24.15
- v0.24.14
- v0.24.13
- v0.24.12
- v0.24.11
- v0.24.10
- v0.24.1
- v0.24.0
- v0.23.9
- v0.23.8
- v0.23.7
- v0.23.6
- v0.23.5
- v0.23.4
- v0.23.3
- v0.23.2
- v0.23.14
- v0.23.13
- v0.23.12
- v0.23.11
- v0.23.10
- v0.23.1
- v0.23.0
- v0.22.0
- v0.21.2
- v0.21.1
- v0.21.0
- v0.20.1
- v0.20.0
- v0.2.0
- v0.19.9
- v0.19.8
- v0.19.7
- v0.19.6
- v0.19.5
- v0.19.4
- v0.19.3
- v0.19.26
- v0.19.25
- v0.19.24
- v0.19.23
- v0.19.22
- v0.19.21
- v0.19.20
- v0.19.2.1
- v0.19.2
- v0.19.19
- v0.19.18
- v0.19.17
- v0.19.16
- v0.19.15
- v0.19.14
- v0.19.13
- v0.19.12
- v0.19.11
- v0.19.10
- v0.19.1
- v0.19.0
- v0.18.9
- v0.18.8
- v0.18.7
- v0.18.6
- v0.18.5
- v0.18.4-pre
- v0.18.4
- v0.18.3
- v0.18.25
- v0.18.24
- v0.18.23
- v0.18.21
- v0.18.20
- v0.18.2
- v0.18.19
- v0.18.18
- v0.18.17
- v0.18.16
- v0.18.15
- v0.18.14
- v0.18.13
- v0.18.12
- v0.18.11
- v0.18.10
- v0.18.1
- v0.18.0
- v0.17.7
- v0.17.6
- v0.17.5
- v0.17.4
- v0.17.3
- v0.17.2
- v0.17.1
- v0.17.0
- v0.16.9
- v0.16.8
- v0.16.7
- v0.16.6
- v0.16.5
- v0.16.4
- v0.16.3
- v0.16.2
- v0.16.14
- v0.16.13
- v0.16.12
- v0.16.11
- v0.16.10
- v0.16.1
- v0.16.0
- v0.15.9
- v0.15.8
- v0.15.7
- v0.15.6
- v0.15.5
- v0.15.4
- v0.15.3
- v0.15.2
- v0.15.13
- v0.15.12
- v0.15.11.2
- v0.15.11.1
- v0.15.11
- v0.15.10
- v0.15.1
- v0.15.0
- v0.14.3
- v0.14.2
- v0.14.1
- v0.14.0
- v0.13.9
- v0.13.8
- v0.13.7
- v0.13.3
- v0.13.2
- v0.13.13
- v0.13.12
- v0.13.11
- v0.13.10
- v0.13.1
- v0.13.0
- v0.12.9
- v0.12.8
- v0.12.7
- v0.12.6
- v0.12.5
- v0.12.4
- v0.12.30
- v0.12.3
- v0.12.25
- v0.12.24
- v0.12.23
- v0.12.22
- v0.12.21
- v0.12.20
- v0.12.2
- v0.12.18
- v0.12.17
- v0.12.16
- v0.12.15
- v0.12.14
- v0.12.13
- v0.12.12
- v0.12.11
- v0.12.10
- v0.12.1
- v0.12.0
- v0.11.9
- v0.11.8
- v0.11.7
- v0.11.6
- v0.11.5
- v0.11.4
- v0.11.3
- v0.11.23
- v0.11.22
- v0.11.21
- v0.11.20
- v0.11.2
- v0.11.19
- v0.11.18
- v0.11.17
- v0.11.16
- v0.11.15
- v0.11.14
- v0.11.13
- v0.11.12
- v0.11.11
- v0.11.10
- v0.11.1
- v0.11.0
- v0.10.9
- v0.10.8
- v0.10.7
- v0.10.6
- v0.10.5
- v0.10.4
- v0.10.36
- v0.10.35
- v0.10.34
- v0.10.33
- v0.10.32
- v0.10.31
- v0.10.30
- v0.10.3
- v0.10.29
- v0.10.28-rc3
- v0.10.28-rc2
- v0.10.28-rc1
- v0.10.27
- v0.10.26
- v0.10.25
- v0.10.24
- v0.10.23
- v0.10.22
- v0.10.21
- v0.10.20
- v0.10.2
- v0.10.19
- v0.10.18
- v0.10.17
- v0.10.16
- v0.10.15
- v0.10.14
- v0.10.13
- v0.10.12
- v0.10.11
- v0.10.10
- v0.10.1
- v0.10.0
- v0.1.0
- v-test.22.6.15.1
- v-test.22.6.15.0
- v-test-220616-1
- v-test-220615-4
- v-test-220615-3
- v-test-220615-2
Take a new snapshot of a software origin
If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.
Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.![swh spinner](/static/img/swh-spinner.gif)
Processing "take a new snapshot" request ...
Permalinks
To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.
Revision | Author | Date | Message | Commit Date |
---|---|---|---|---|
9a1e327 | Yong He | 01 March 2024, 23:24:16 UTC | Make slangc commandline parsing compatible with renderdoc. (#3658) * Make slangc commandline parsing compatible with renderdoc. * Fix tests. | 01 March 2024, 23:24:16 UTC |
e752a95 | Yong He | 01 March 2024, 21:48:46 UTC | Update doc TOC (#3657) | 01 March 2024, 21:48:46 UTC |
ff48854 | Yong He | 01 March 2024, 21:39:25 UTC | Add documentation for debugging. (#3656) * Add documentation for debugging. * typo | 01 March 2024, 21:39:25 UTC |
cc9ada1 | Ellie Hermaszewska | 01 March 2024, 21:19:19 UTC | Small cleanups for bitfield accessor synthesis (#3651) * Remove duplicate function * neaten --------- Co-authored-by: Yong He <yonghe@outlook.com> | 01 March 2024, 21:19:19 UTC |
a4ba7d6 | Ellie Hermaszewska | 01 March 2024, 20:43:26 UTC | warnings (#3653) * Remove unused code * unused variable warnings * unused variable --------- Co-authored-by: Yong He <yonghe@outlook.com> | 01 March 2024, 20:43:26 UTC |
0d01b37 | Yong He | 01 March 2024, 20:42:37 UTC | Various SPIRV fixes. (#3655) * Various SPIRV fixes. * Fix debugValue. | 01 March 2024, 20:42:37 UTC |
3ade073 | Yong He | 01 March 2024, 02:02:53 UTC | Fix various crashes when generating debug info. (#3650) * Fix crash when generating debug info for geometry shaders. * Fix. * Fix source language field in DebugCompilationUnit. * Fix. * Emit DebugEntryPoint inst. * Add trivial test. * Cleanup. * More cleanup. | 01 March 2024, 02:02:53 UTC |
458d663 | Yong He | 29 February 2024, 19:42:49 UTC | [SPIRV] Fix logic for emitting debug matrix type. (#3649) | 29 February 2024, 19:42:49 UTC |
17da4d9 | Yong He | 29 February 2024, 18:00:43 UTC | [SPIRV Debug] Properly update output arguments after call. (#3648) | 29 February 2024, 18:00:43 UTC |
d979b50 | Ellie Hermaszewska | 29 February 2024, 17:50:19 UTC | Add support for bitfields (#3639) * Add support for bitfields Closes https://github.com/shader-slang/slang/issues/3559 * Set scopes for syntsized bitfield accessors * Simplify generated code for bitfield accessors * spelling * regenerate vs project * warnings | 29 February 2024, 17:50:19 UTC |
21f8677 | Yong He | 29 February 2024, 17:17:16 UTC | Fix crash in `insertDebugValueStore`. (#3647) | 29 February 2024, 17:17:16 UTC |
c6756d7 | Yong He | 29 February 2024, 07:26:51 UTC | Allow non-static const to be considered compile-time constant. (#3645) | 29 February 2024, 07:26:51 UTC |
73a61ed | Yong He | 29 February 2024, 06:57:07 UTC | [SPIRV] Add NonSemanticDebugInfo for step-through debugging. (#3644) * [SPIRV] Add NonSemanticDebugInfo for step-through debugging. * Fix. * Fix. | 29 February 2024, 06:57:07 UTC |
d2644e2 | Yong He | 27 February 2024, 22:23:25 UTC | Update documentation TOC. (#3641) | 27 February 2024, 22:23:25 UTC |
5c45608 | Yong He | 27 February 2024, 22:10:07 UTC | Update 08-compiling.md | 27 February 2024, 22:10:07 UTC |
11966f8 | Yong He | 27 February 2024, 22:03:08 UTC | Update doc links. (#3640) | 27 February 2024, 22:03:08 UTC |
1e5d0b3 | Yong He | 27 February 2024, 21:32:43 UTC | Add documentation for link-time specialization. (#3638) | 27 February 2024, 21:32:43 UTC |
92cc3a7 | Yong He | 27 February 2024, 19:31:04 UTC | Update links in user-guide documentation | 27 February 2024, 19:31:04 UTC |
e3fdfe5 | skallweitNV | 27 February 2024, 16:42:39 UTC | add support for shared resources on vulkan/linux (#3636) | 27 February 2024, 16:42:39 UTC |
188482e | Yong He | 27 February 2024, 02:00:34 UTC | Update documentation on compilation API. (#3634) | 27 February 2024, 02:00:34 UTC |
3952215 | Yong He | 27 February 2024, 01:00:31 UTC | Allow default values for `extern` symbols. (#3632) * Allow default values for `extern` symbols. * Fix. * Fix test. | 27 February 2024, 01:00:31 UTC |
1d8e93c | Jay Kwak | 27 February 2024, 00:10:08 UTC | WAR for ForceInline not working issue in stdlib (#3630) * WAR for ForceInline not working issue in stdlib Work-around for an issue #3628 This commit allows __init() functions in stdlib to be decleared without "[__unsafeForceInlineEarly]" or "[ForceInline]". We need to find a proper solution for the issue later. * Remove unnecessary checking of the missing body This fixes an issue #3628 This commmit removes an unnecessary checking of the missing body of the constructors in stdlib. This change was suggested by Yong. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 27 February 2024, 00:10:08 UTC |
3286076 | tgrimesnv | 27 February 2024, 00:09:44 UTC | atomic intrinsic test (#3623) * Add first draft of atomic intrinsic test * Disable CUDA in atomic intrinsic test --------- Co-authored-by: Yong He <yonghe@outlook.com> | 27 February 2024, 00:09:44 UTC |
1241006 | ArielG-NV | 27 February 2024, 00:09:09 UTC | Partially implement shader_subgroup extension(s); Partially resolves #3548 (#3580) * Partially Implement with tests, functions and built-in variables apart of GL_KHR_shader_subgroup; Partially resolves #3548 Partially Implement with tests, functions and built-in variables apart of GL_KHR_shader_subgroup; Partially resolves #3548 GL_KHR_shader_subgroup implemented based on https://github.com/KhronosGroup/GLSL/blob/main/extensions/khr/GL_KHR_shader_subgroup.txt Implementation is broken down into seperate glsl extensions due to the ***large differences*** in implementation of each section, and functionality/testing. GL_KHR_shader_subgroup_basic{ **Partially implemented** Implementation: * All 9 built-in variables have been stubbed without proper value; implementation is still required for these system variables; related to #411. * Functions were reimplemented despite nearly mirrored HLSL functions due to: * hlsl.meta implementations targetting workgroups rather than a warp/wave/subgroup: * `__syncwarp` vs `__syncthreads` * `SubgroupMemory` vs `WorkgroupMemory` * etc. * hlsl.meta implementations target broader SPIR-V memory targets to block on: * ImageMemory|UniformMemory versus SPIR-V specifying barriers for ImageMemory and seperately an option for UniformMemory * `subgroupElect` for CUDA has a different implementation than `WaveIsFirstLane`, this is because spec states that `subgroupElect()` only returns the lowest active gl_SubgroupInvocationID; therefore we are supposed to fetch the current active mask even if some invocations are turned off by branches Testing: tests for the variable -- `tests/glsl/shader-subgroup-built-in-variables.slang` * these tests do not test functionality since not implemented yet tests for the functions -- `tests/glsl/shader-subgroup-basic.slang` * concurrency is tested for using SubgroupMemory, UniformMemory through attempting to create a GPU side race condition with writing and reading memory * due to testing tools avaible there are no tests for ImageMemory * subgroupElect is tested to return invocation #0, the lowest invocation that will always run; wave size is 32, therefore #0 is always active and will always be the elected invocation. } GL_KHR_shader_subgroup_vote{ **Fully implemented** Implementation: * 3/3 functions are using the hlsl.meta implementation Testing: `tests/glsl/shader-subgroup-vote.slang` * Testing each a positive (returns true) and negative (returns false) test case to ensure vote results are correct } GL_KHR_shader_subgroup_ballot{ **Partially implemented** Implementation: There are 10/10 functions that are implemented: * 3 are using hlsl.meta implementation * 7 are using new implementations -- only support GLSL, SPIR-V, HLSL, CUDA * These implementations do not exist in hlsl.meta, so they were added * `subgroupInverseBallot` lacks an analog function to call; this feature was emulated: * in CUDA through knowing waves are 32bit and lanes are 0 indexed, this implys that ` (ballotResult >> YOUR_INVOCATION) & 1` checks if your invocation is active, for example, `(0b11001 >> 3) & 1` would mean that only invocation 5, 4, and 1 is active, 3 would mean `YOUR_INVOCATION` is the fourth invocation in the subgroup. `(0b11001>>3) & 1` would return true since your bit is toggled and evaluates to `0b11 & 0b1` * in HLSL through testing if the wave count is 32 or less (use the same logic as CUDA in this case); else find the index `YOUR_INVOCATION` corrisponds with where each vector has 32bits (32 waves); avoid division in the process. then run the same algorithm cuda employs. * `subgroupBallotBitExtract` is logically the same as `subgroupInverseBallot` * 5 implementations do not have a CUDA, HLSL, and CPP imlementation yet (subgroupBallotFindMSB, subgroupBallotFindLSB, subgroupBallotExclusiveBitCount, subgroupBallotInclusiveBitCount, subgroupBallotBitCount) due to being out of scope for the commit Testing: `tests/glsl/shader-subgroup-ballot.slang` * the function tests for an expected value of each ballot function; tests try inputting larger than 32 toggled bits as function parameters to ensure the implementation correctly identifies values up to a maximum of the subgroup invocation count as per extension specification (otherwise the functionality is fairly trivial to test) } GL_KHR_shader_subgroup_arithmetic{ **Partially implemented** Implementation: * There are 21 functions to implement: * 14 functions are using the hlsl.meta implementation * 7 functions are new implementations -- only implemented for GLSL and SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required * CUDA, CPP, HLSL are out of scope for the commit Testing: `tests/glsl/shader-subgroup-arithmetic.slang` * all tests silently kill the shader; outputted GLSL was checked, could not see an issue * these tests only check basic functionality and correctness of all functions implemented; not an exaustive test [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_shuffle{ **Partially implemented** Implementation: * There are 2 functions to implement: * 1 function is using the existing hlsl.meta implmentation * 1 function is using a new implmentation (subgroupShuffleXor) -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle.slang` * these tests only check basic functionality and correctness of all functions implemented; not an exaustive test [further continued in "Other notes of worthy" at end of commit] * tests fail with cpp due to `kIROp_WaveGetActiveMask` failing to be called } GL_KHR_shader_subgroup_shuffle_relative{ **Partially implemented** Implementation: * There are 2 functions to implement: * all 2 functions are using a new implmentation -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle-relative.slang` * these tests only check basic functionality and correctness of all functions implemented; not an exaustive test [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_clustered{ **Partially implemented** Implementation: * There are 7 functions to implement: * all 7 functions are using a new implmentation -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle-clustered.slang` * these tests only check basic functionality and correctness of all functions implemented; not an exaustive test [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_quad{ **Partially implemented** Implementation: * There are 4 functions to implement: * all 4 functions are using hlsl.meta implmentations -- only implemented for GLSL & SPIR-V & HLSL Testing: `tests/glsl/shader-subgroup-shuffle-quad.slang` * these tests only check basic functionality and correctness of all functions implemented; not an exaustive test [further continued in "Other notes of worthy" at end of commit] } --------- Failing tests and why: Note: due to system variables not being implemented largly for CUDA and CPP, these tests will fail (#3 and #4){ tests/glsl/shader-subgroup-arithmetic.slang.3 tests/glsl/shader-subgroup-arithmetic.slang.4 tests/glsl/shader-subgroup-ballot.slang.4 tests/glsl/shader-subgroup-basic.slang.3 tests/glsl/shader-subgroup-basic.slang.4 tests/glsl/shader-subgroup-quad.slang.3 tests/glsl/shader-subgroup-quad.slang.4 tests/glsl/shader-subgroup-vote.slang.3 tests/glsl/shader-subgroup-vote.slang.4 } Note: due to kIROp_WaveGetActiveMask not being loaded for cpp the following test will fail{ tests/glsl/shader-subgroup-shuffle.slang.4 } Note: due to a unknown silent error the following will fail [could not spot an error in the generated glsl and spir-v]{ tests/glsl/shader-subgroup-arithmetic.slang.5 (vk) tests/glsl/shader-subgroup-arithmetic.slang.6 (vk) } Other notes of worthy:{ * only a few types are checked currently in tests due to equality templates not allowing freely casting to int/uint, meaning to test types en-mass is not trivial and will most likley be completly replaced once templates can cast & check equality more freely. * did not implement vector types for any functions that may use them (mostly in reference to SPIR-V, since many may accept scalar or vector inputs); applicable to subgroup-shuffle, subgroup-shuffle-relative, subgroup-arithmetic, subgroup-shuffle, subgroup_clustered, subgroup_quad * did not implement checks for half floats * CUDA, CPP, HLSL implementations were largly out of scope and if not implemented, this is due to the implementation not being trivial } Random fixes encountered:{ * hlsl.meta incorrectly sets `OpCapability` as `GroupNonUniformBallot` when the `OpCapability` should be `GroupNonUniformVote`; this is as per SPIR-V spec for all SPIR-V calls used in `GL_KHR_shader_subgroup_vote`: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpGroupNonUniformAll } * added vector types and tests; Partially Implement with tests, functions and built-in variables apart of GL_KHR_shader_subgroup; Partially resolves #3548 GL_KHR_shader_subgroup implemented based on https://github.com/KhronosGroup/GLSL/blob/main/extensions/khr/GL_KHR_shader_subgroup.txt GL_KHR_shader_subgroup_* & GLSL ref: * https://github.com/KhronosGroup/GLSL/blob/main/extensions/khr/GL_KHR_shader_subgroup.txt * https://www.khronos.org/blog/vulkan-subgroup-tutorial * https://www.khronos.org/assets/uploads/developers/library/2018-vulkan-devday/06-subgroups.pdf HLSL ref: * https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-intrinsic-functions * https://github.com/Microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics CUDA ref: * https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html SPIR-V ref: * https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_memory_semantics_id Implementation is broken down into seperate glsl extensions due to the ***large differences*** in implementation of each section, and functionality/testing. GL_KHR_shader_subgroup_basic{ **Partially implemented** Implementation: * All 9 built-in variables have been stubbed without proper value; implementation is still required for these system variables; related to #411. * Functions were reimplemented despite nearly mirrored HLSL functions due to: * hlsl.meta implementations targetting workgroups rather than a warp/wave/subgroup: * `__syncwarp` vs `__syncthreads` * `SubgroupMemory` vs `WorkgroupMemory` * etc. * hlsl.meta implementations target broader SPIR-V memory targets to block on: * ImageMemory|UniformMemory versus SPIR-V specifying barriers for ImageMemory and seperately an option for UniformMemory * `subgroupElect` for CUDA has a different implementation than `WaveIsFirstLane`, this is because spec states that `subgroupElect()` only returns the lowest active gl_SubgroupInvocationID; therefore we are supposed to fetch the current active mask even if some invocations are turned off by branches Testing: tests for the variable -- `tests/glsl/shader-subgroup-built-in-variables.slang` * these tests do not test functionality since not implemented yet tests for the functions -- `tests/glsl/shader-subgroup-basic.slang` * concurrency is tested for using SubgroupMemory, UniformMemory through attempting to create a GPU side race condition with writing and reading memory * due to testing tools avaible there are no tests for ImageMemory * subgroupElect is tested to return invocation #0, the lowest invocation that will always run; wave size is 32, therefore #0 is always active and will always be the elected invocation. } GL_KHR_shader_subgroup_vote{ **Fully implemented** Implementation: * 3/3 functions are using the hlsl.meta implementation Testing: `tests/glsl/shader-subgroup-vote.slang` * Testing each a positive (returns true) and negative (returns false) test case to ensure vote results are correct } GL_KHR_shader_subgroup_ballot{ **Partially implemented** Implementation: There are 10/10 functions that are implemented: * 3 are using hlsl.meta implementation * 7 are using new implementations -- only support GLSL, SPIR-V, HLSL, CUDA * These implementations do not exist in hlsl.meta, so they were added * `subgroupInverseBallot` lacks an analog function to call; this feature was emulated: * in CUDA through knowing waves are 32bit and lanes are 0 indexed, this implys that ` (ballotResult >> YOUR_INVOCATION) & 1` checks if your invocation is active, for example, `(0b11001 >> 3) & 1` would mean that only invocation 5, 4, and 1 is active, 3 would mean `YOUR_INVOCATION` is the fourth invocation in the subgroup. `(0b11001>>3) & 1` would return true since your bit is toggled and evaluates to `0b11 & 0b1` * in HLSL through testing if the wave count is 32 or less (use the same logic as CUDA in this case); else find the index `YOUR_INVOCATION` corrisponds with where each vector has 32bits (32 waves); avoid division in the process. then run the same algorithm cuda employs. * `subgroupBallotBitExtract` is logically the same as `subgroupInverseBallot` * 5 implementations do not have a CUDA, HLSL, and CPP imlementation yet (subgroupBallotFindMSB, subgroupBallotFindLSB, subgroupBallotExclusiveBitCount, subgroupBallotInclusiveBitCount, subgroupBallotBitCount) due to being out of scope for the commit Testing: `tests/glsl/shader-subgroup-ballot.slang` * the function tests for an expected value of each ballot function; tests try inputting larger than 32 toggled bits as function parameters to ensure the implementation correctly identifies values up to a maximum of the subgroup invocation count as per extension specification (otherwise the functionality is fairly trivial to test) } GL_KHR_shader_subgroup_arithmetic{ **Partially implemented** Implementation: * There are 21 functions to implement: * 14 functions are using the hlsl.meta implementation * 7 functions are new implementations -- only implemented for GLSL and SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required * CUDA, CPP, HLSL are out of scope for the commit Testing: `tests/glsl/shader-subgroup-arithmetic.slang` * all tests silently kill the shader; outputted GLSL was checked, could not see an issue * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_shuffle{ **Partially implemented** Implementation: * There are 2 functions to implement: * 1 function is using the existing hlsl.meta implmentation * 1 function is using a new implmentation (subgroupShuffleXor) -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] * tests fail with cpp due to `kIROp_WaveGetActiveMask` failing to be called } GL_KHR_shader_subgroup_shuffle_relative{ **Partially implemented** Implementation: * There are 2 functions to implement: * all 2 functions are using a new implmentation -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle-relative.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_clustered{ **Partially implemented** Implementation: * There are 7 functions to implement: * all 7 functions are using a new implmentation -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle-clustered.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_quad{ **Partially implemented** Implementation: * There are 4 functions to implement: * all 4 functions are using hlsl.meta implmentations -- only implemented for GLSL & SPIR-V & HLSL Testing: `tests/glsl/shader-subgroup-shuffle-quad.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } --------- Failing tests and why: Note: test numbers are assuming none of the existing tests are toggled off Note: due to system variables not being implemented largly for CUDA and CPP, these tests will fail (#3 and #4){ tests/glsl/shader-subgroup-arithmetic.slang.3 tests/glsl/shader-subgroup-arithmetic.slang.4 tests/glsl/shader-subgroup-ballot.slang.4 tests/glsl/shader-subgroup-basic.slang.3 tests/glsl/shader-subgroup-basic.slang.4 tests/glsl/shader-subgroup-quad.slang.3 tests/glsl/shader-subgroup-quad.slang.4 tests/glsl/shader-subgroup-vote.slang.3 tests/glsl/shader-subgroup-vote.slang.4 } Note: due to kIROp_WaveGetActiveMask not being loaded for cpp the following test will fail{ tests/glsl/shader-subgroup-shuffle.slang.4 tests/glsl/shader-subgroup-shuffle-relative.slang.4 tests/glsl/shader-subgroup-basic.slang.4 } Note: due to a unknown silent error the following will fail [could not spot an error in the generated glsl and spir-v]{ tests/glsl/shader-subgroup-arithmetic.slang.5 (vk) tests/glsl/shader-subgroup-arithmetic.slang.6 (vk) } Other notes of worthy:{ * only a few types are checked currently in arithmetic test; this is due to the test silently failing, meaning I can't actually test anything implemented * did not implement checks for half floats * CUDA, CPP, HLSL implementations were largly out of scope and not implemented, this is due to the implementation being non trivial for many functions } Random fixes encountered:{ * hlsl.meta incorrectly sets `OpCapability` as `GroupNonUniformBallot` when the `OpCapability` should be `GroupNonUniformVote`; this is as per SPIR-V spec for all SPIR-V calls used in `GL_KHR_shader_subgroup_vote`: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpGroupNonUniformAll } * Partially Implement with tests, functions and built-in variables apart of GL_KHR_shader_subgroup; Partially resolves #3548 Partially Implement with tests, functions and built-in variables apart of GL_KHR_shader_subgroup; Partially resolves #3548 GL_KHR_shader_subgroup implemented based on https://github.com/KhronosGroup/GLSL/blob/main/extensions/khr/GL_KHR_shader_subgroup.txt GL_KHR_shader_subgroup_* & GLSL ref: * https://github.com/KhronosGroup/GLSL/blob/main/extensions/khr/GL_KHR_shader_subgroup.txt * https://www.khronos.org/blog/vulkan-subgroup-tutorial * https://www.khronos.org/assets/uploads/developers/library/2018-vulkan-devday/06-subgroups.pdf HLSL ref: * https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-intrinsic-functions * https://github.com/Microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics CUDA ref: * https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html SPIR-V ref: * https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_memory_semantics_id Implementation is broken down into seperate glsl extensions due to the ***large differences*** in implementation of each section, and functionality/testing. GL_KHR_shader_subgroup_basic{ **Partially implemented** Implementation: * All 9 built-in variables have been stubbed without proper value; implementation is still required for these system variables; related to #411. * Functions were reimplemented despite nearly mirrored HLSL functions due to: * hlsl.meta implementations targetting workgroups rather than a warp/wave/subgroup: * `__syncwarp` vs `__syncthreads` * `SubgroupMemory` vs `WorkgroupMemory` * etc. * hlsl.meta implementations target broader SPIR-V memory targets to block on: * ImageMemory|UniformMemory versus SPIR-V specifying barriers for ImageMemory and seperately an option for UniformMemory * `subgroupElect` for CUDA has a different implementation than `WaveIsFirstLane`, this is because spec states that `subgroupElect()` only returns the lowest active gl_SubgroupInvocationID; therefore we are supposed to fetch the current active mask even if some invocations are turned off by branches Testing: tests for the variable -- `tests/glsl/shader-subgroup-built-in-variables.slang` * these tests do not test functionality since not implemented yet tests for the functions -- `tests/glsl/shader-subgroup-basic.slang` * concurrency is tested for using SubgroupMemory, UniformMemory through attempting to create a GPU side race condition with writing and reading memory * due to testing tools avaible there are no tests for ImageMemory * subgroupElect is tested to return invocation #0, the lowest invocation that will always run; wave size is 32, therefore #0 is always active and will always be the elected invocation. } GL_KHR_shader_subgroup_vote{ **Fully implemented** Implementation: * 3/3 functions are using the hlsl.meta implementation Testing: `tests/glsl/shader-subgroup-vote.slang` * Testing each a positive (returns true) and negative (returns false) test case to ensure vote results are correct } GL_KHR_shader_subgroup_ballot{ **Partially implemented** Implementation: There are 10/10 functions that are implemented: * 3 are using hlsl.meta implementation * 7 are using new implementations -- only support GLSL, SPIR-V, HLSL, CUDA * These implementations do not exist in hlsl.meta, so they were added * `subgroupInverseBallot` lacks an analog function to call; this feature was emulated: * in CUDA through knowing waves are 32bit and lanes are 0 indexed, this implys that ` (ballotResult >> YOUR_INVOCATION) & 1` checks if your invocation is active, for example, `(0b11001 >> 3) & 1` would mean that only invocation 5, 4, and 1 is active, 3 would mean `YOUR_INVOCATION` is the fourth invocation in the subgroup. `(0b11001>>3) & 1` would return true since your bit is toggled and evaluates to `0b11 & 0b1` * in HLSL through testing if the wave count is 32 or less (use the same logic as CUDA in this case); else find the index `YOUR_INVOCATION` corrisponds with where each vector has 32bits (32 waves); avoid division in the process. then run the same algorithm cuda employs. * `subgroupBallotBitExtract` is logically the same as `subgroupInverseBallot` * 5 implementations do not have a CUDA, HLSL, and CPP imlementation yet (subgroupBallotFindMSB, subgroupBallotFindLSB, subgroupBallotExclusiveBitCount, subgroupBallotInclusiveBitCount, subgroupBallotBitCount) due to being out of scope for the commit Testing: `tests/glsl/shader-subgroup-ballot.slang` * the function tests for an expected value of each ballot function; tests try inputting larger than 32 toggled bits as function parameters to ensure the implementation correctly identifies values up to a maximum of the subgroup invocation count as per extension specification (otherwise the functionality is fairly trivial to test) } GL_KHR_shader_subgroup_arithmetic{ **Partially implemented** Implementation: * There are 21 functions to implement: * 14 functions are using the hlsl.meta implementation * 7 functions are new implementations -- only implemented for GLSL and SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required * CUDA, CPP, HLSL are out of scope for the commit Testing: `tests/glsl/shader-subgroup-arithmetic.slang` * all tests silently kill the shader; outputted GLSL was checked, could not see an issue * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_shuffle{ **Partially implemented** Implementation: * There are 2 functions to implement: * 1 function is using the existing hlsl.meta implmentation * 1 function is using a new implmentation (subgroupShuffleXor) -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] * tests fail with cpp due to `kIROp_WaveGetActiveMask` failing to be called } GL_KHR_shader_subgroup_shuffle_relative{ **Partially implemented** Implementation: * There are 2 functions to implement: * all 2 functions are using a new implmentation -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle-relative.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_clustered{ **Partially implemented** Implementation: * There are 7 functions to implement: * all 7 functions are using a new implmentation -- only implmented for GLSL & SPIR-V * GLSL & SPIR-V both use their related functions, no emulation required Testing: `tests/glsl/shader-subgroup-shuffle-clustered.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } GL_KHR_shader_subgroup_quad{ **Partially implemented** Implementation: * There are 4 functions to implement: * all 4 functions are using hlsl.meta implmentations -- only implemented for GLSL & SPIR-V & HLSL Testing: `tests/glsl/shader-subgroup-shuffle-quad.slang` * these tests only check basic functionality and correctness of all functions implemented; [further continued in "Other notes of worthy" at end of commit] } --------- Failing tests and why: Note: test numbers are assuming none of the existing tests are toggled off Note: due to system variables not being implemented largly for CUDA and CPP, these tests will fail (#3 and #4){ tests/glsl/shader-subgroup-arithmetic.slang.3 tests/glsl/shader-subgroup-arithmetic.slang.4 tests/glsl/shader-subgroup-ballot.slang.4 tests/glsl/shader-subgroup-basic.slang.3 tests/glsl/shader-subgroup-basic.slang.4 tests/glsl/shader-subgroup-quad.slang.3 tests/glsl/shader-subgroup-quad.slang.4 tests/glsl/shader-subgroup-vote.slang.3 tests/glsl/shader-subgroup-vote.slang.4 } Note: due to kIROp_WaveGetActiveMask not being loaded for cpp the following test will fail{ tests/glsl/shader-subgroup-shuffle.slang.4 tests/glsl/shader-subgroup-shuffle-relative.slang.4 tests/glsl/shader-subgroup-basic.slang.4 } Other notes of worthy:{ * added preamble function and macros for implementing subgroup functionality (and tests) to make it possible to iterate on the functionality with reasonable effort in the future * CUDA, CPP, HLSL implementations were largly out of scope and not implemented, this is due to the implementation being non trivial for many functions * doubles cause a silent crash on most subgroup functions tested (silent shader hang) * __requireGLSLExtension does not work as intended inside glsl.meta; as a result half, int16, int64 int8, all are ommited from testing } Random fixes encountered:{ * hlsl.meta incorrectly sets `OpCapability` as `GroupNonUniformBallot` when the `OpCapability` should be `GroupNonUniformVote`; this is as per SPIR-V spec for all SPIR-V calls used in `GL_KHR_shader_subgroup_vote`: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpGroupNonUniformAll * hlsl.meta incorrectly uses for WaveMaskPrefixBitOr (SPIR-V) OpGroupNonUniformBitwiseAnd intead of OpGroupNonUniformBitwiseOr; this was fixed } * redesign tests under suggestions that they should be smaller, more maintainable, and test the most amount of data reasonabley possible (balance with fast iterations); optional double testing varying parameter testing most tests chain results now * fix missing impl and merge conflict resolutions * reundant test code cleanup and organization move tests to proper location (glsl-intrinsic) clean up redundant code (input buffers) * add missing logical operands support (and remove hlsl/cuda code reuse due to the functional differences) under all And, Or, Xor ops redesign tests to conform to a better testing paradigm * testing code style change to not use white space as a toggle for tests * provided crash reason for doubles (intel iris gpu's crash in glsl with doubles due to missing support in device caps [as per vulkan validation layer) uncommented the `__requireGLSLExtension` code so once it is fixed int16/8/64/half wil work with subgroup not requiring future intervention * fixing some vk validation layer errors (OpMemoryBarrier, Shuffle operations) modified style of tests; removed redundancy (extra code that does nothing); fixed some incorrect run targets; added error reasons for all encountered problems (and if needed, a #define/#if toggle) * remove comments of important tests inplace of #define over the broken feature of extended shader_subgroup types * removed macros inside glsl.meta removed erroneous __target_switch to directly call hlsl.meta function added elaboration on the problem with __requireGLSLExtension changed WaveMaskPrefixBit[or|and|xor] to support the expected type of <int> only as per `HLSL Shader Model 6.5` specs removed "precision highp" since it does not affect tests * changes some hlsl.meta functions used to be more appropriate (as per suggested) WaveMask -> WaveActive.* WaveMaskPrefix.* -> WavePrefix.* remove __target_switch case's for unimplemented case's of intrinsics fix _getLaneId() being removed from some regex used earlier * fix usage of __target_intrinsic instead of __intrinsic_asm; silently would cause only arguments to be emmitted as return changed usage of `__requireGLSLExtension` because now it causes a crash from the missing intrinsic (instead of a silent error) * fix shader subgroup extended types support for GLSL and SPIR-V: 1. seperate intrinsic/__requireGLSL generating functionality of shader_subgroup_preamble into child function calls due to otherwise `__requireGLSLExtension` being ignored if the calling function of shader_subgroup_preamble calls an `__intrinsic_asm` 2. fixed HLSL.meta logic for wave operations (Add, Mul, exclusiveAdd, exclusiveMul) to no longer cast the input type T into a uint due to cost-of-op & crash. * Int8_t bit casted into uint32_t crashed the compiler. As per SPIR-V spec, OpGroupNonUniformI.* work on uint and int types meaning the function has no need to cast to a unit. 3. removed erroneous __target_switch for subgroupShuffle * 1. ignore tests gracefully 2. remove un-needed SPIRV capability specifying (with OpCapability) 3. clean up structure of typeRequireChecks_shader_subgroup_GLSL 4. explain why HLSL/CUDA are not targeted for shader-subgroup-arithmetic.slang * syntax changes + `property` declaration fix + builtin var glsl implementation + changed incorrect HLSL.meta assumptions (#1)`property` declaration as *non member* implementation change/fix (all of the changes to `slang-lower-to-ir.cpp`) using (#1), implemented subgroup builtin's for GLSL/SPIR-V; did not implement built'ins completly for HLSL/CUDA due to non trivial implementations. CPP has no implementation due to missing support of system values changed some incorrect HLSL.meta subgroup implementation assumptions of type usage (bit casting 8bit->32bit, wrong capabilities causing errors) dumping ast crash with spir-v when using builtin's fixed by adding the `builtin` spirv case (all of the changes to `slang-ast-dump.cpp`) [ForceInline] addition to functions missing it return instead of spirv_asm when empty blocks are used * syntax & organization of tests adjustment (specifically how if'def's are managed) * figuring out where ci fails * figuring out where ci fails -- testing with enclusive & regular * testing CI with exclusive, regular, inclusive * remove unneeded white space test CI inconsistency issues further with arithmetic.slang * testing if the ci run fails due to some timeout/recovery issue * split up arithmetic tests and push to test with CI --------- Co-authored-by: Yong He <yonghe@outlook.com> | 27 February 2024, 00:09:09 UTC |
4f03eb9 | Simon Kallweit | 26 February 2024, 23:32:03 UTC | switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain (#3627) * switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain * fix window content size on macos --------- Co-authored-by: Yong He <yonghe@outlook.com> | 26 February 2024, 23:32:03 UTC |
ceb87b2 | Sai Praveen Bangaru | 26 February 2024, 23:22:16 UTC | AD: Handle case where struct is created with `no_diff`-wrapped operands. (#3629) * Handle case where struct is created with `no_diff`-wrapped operands. * Add test to reproduce crash upon initializing a struct with `no_diff`-wrapped operand type * Add expected result for test | 26 February 2024, 23:22:16 UTC |
d7bb806 | NBickford | 24 February 2024, 23:46:08 UTC | Enable SLANG_MAKE_VECTOR calls when using SLANG_CUDA_ENABLE_HALF without SLANG_CUDA_RTC (#3624) | 24 February 2024, 23:46:08 UTC |
a1827ee | Yong He | 24 February 2024, 03:05:23 UTC | SPIRV Fixes. (#3622) * Use SpvSourceLanguageSlang enum. * Fix spirv entrypoint interface. * Cleanup. * Add error on unknown spirv opcode. * Fix CI. * Fix. | 24 February 2024, 03:05:23 UTC |
401d8cd | Yong He | 24 February 2024, 00:39:46 UTC | Add slangc interface to compile and use ir modules. (#3615) * Add slangc interface to compile and use ir modules. * Fix glsl scalar layout settings not copied to target. * Fix. * Cleanups. | 24 February 2024, 00:39:46 UTC |
58eb6f7 | NBickford | 23 February 2024, 07:07:46 UTC | Fix linking of slang-bootstrap by linking with slang-lookup-tables (#3618) | 23 February 2024, 07:07:46 UTC |
8ec5b3e | Yong He | 22 February 2024, 15:14:55 UTC | Add API for querying and reusing precompiled binary modules. (#3614) | 22 February 2024, 15:14:55 UTC |
c5ac7de | kaizhangNV | 22 February 2024, 04:30:49 UTC | Add release package build for linux aarch64 (#3612) | 22 February 2024, 04:30:49 UTC |
1c76f2e | kaizhangNV | 21 February 2024, 22:47:28 UTC | Revert "Add new release package for aarch64 linux (#3609)" (#3611) This reverts commit 255ecf7993cc69d38525af7e711c24fae6f94ba5. Co-authored-by: Yong He <yonghe@outlook.com> | 21 February 2024, 22:47:28 UTC |
0b46715 | Yong He | 21 February 2024, 21:59:30 UTC | Fix parsing of literals in stdlib. (#3610) * Fix parsing of literals in stdlib. * Fix double lit limits. | 21 February 2024, 21:59:30 UTC |
255ecf7 | kaizhangNV | 21 February 2024, 20:22:51 UTC | Add new release package for aarch64 linux (#3609) Co-authored-by: Yong He <yonghe@outlook.com> | 21 February 2024, 20:22:51 UTC |
b3b6c44 | Yong He | 21 February 2024, 20:22:31 UTC | Fix SPIRV lowering issue. (#3608) * Fix SPIRV pointer lowering issue. Fixes #3605. * Add another pointer test. Fixes #3601. * Fixes #3600. * Fix #3595. | 21 February 2024, 20:22:31 UTC |
70ea0b0 | skallweitNV | 21 February 2024, 07:20:07 UTC | derive approximate DX12 shader model in vulkan (#3596) Co-authored-by: Yong He <yonghe@outlook.com> | 21 February 2024, 07:20:07 UTC |
2e2c794 | Yong He | 21 February 2024, 07:13:29 UTC | Language server robustness fix. (#3607) * Language server robustness fix. * Allow parameter name to be the same as its type. * fix * Fix test. | 21 February 2024, 07:13:29 UTC |
2ee05c1 | Yong He | 21 February 2024, 05:35:03 UTC | Add wrapper type syntax for link time specialization. (#3606) * Add wrapper type syntax for link time specialization. * Cleanup. | 21 February 2024, 05:35:03 UTC |
a62be59 | Yong He | 20 February 2024, 23:37:11 UTC | Support link time type specialization. (#3604) | 20 February 2024, 23:37:11 UTC |
4d20fd3 | Yong He | 20 February 2024, 20:24:00 UTC | Refactor compiler option representations. (#3598) * Refactor compiler option representation. * Fix binary compatibility. * Add a test for specifying compiler options at link time. * Fix binary compatibility. * Fix binary compatibility. * Fix backward compatibility on matrix layout. * Fix. * Fix. * Fix. * Fix gfx. * Fix gfx. * Fix dynamic dispatch. * Polish. | 20 February 2024, 20:24:00 UTC |
8e9b61e | Jay Kwak | 17 February 2024, 19:04:55 UTC | Fix the build when you try to build slang-glslang (#3599) | 17 February 2024, 19:04:55 UTC |
b50d311 | Lukas Lipp | 16 February 2024, 05:15:18 UTC | cmake: option to build a static library version of slang (#3578) * cmake: slang lib type setting * cmake: change name for slang lib type setting --------- Co-authored-by: Yong He <yonghe@outlook.com> | 16 February 2024, 05:15:18 UTC |
c639cac | tgrimesnv | 15 February 2024, 20:08:46 UTC | HLSL texture intrinsic test first draft. (#3583) * HLSL texture intrinsic test first draft. * Some updated to texture-intrinsics.slang * Update dx11 test config in texture-intrinsics.slang * made some edits that shouldn't matter, but commiting once more to be sure * Switch to filecheck-buffer and differing output values per api * Forgot to uncomment one function and updated expected values. * Delete tests/hlsl-intrinsic/texture/texture-intrinsics.slang.expected.txt * Cubemap SampleGrad * Enable Vulkan and have SampleCmpLevelZero ifdefed out for Vulkan | 15 February 2024, 20:08:46 UTC |
5a623ec | Yong He | 15 February 2024, 08:05:51 UTC | Support loading serialized modules. (#3588) * Support loading serialized modules. * Fix. * Fix vs solution files * Fix glsl module loading. * C++ fix. * Fix. * Try fix c++ error. * Try fix. * Fix. * Fix. | 15 February 2024, 08:05:51 UTC |
2ced683 | kaizhangNV | 15 February 2024, 06:19:01 UTC | Deploy the falcor-perf-test (#3579) * Deploy the falcor-compiler-perf-test Deploy the falcor-compiler-perf-test to falcor-test.yml file. It will download the release pre-build from: https://github.com/shader-slang/falcor-compile-perf-test and run the test executable with newly built slang libraries. It only works on win64 now. Disable running the tests on macos and linux platform. * make a separate yml file to only run falcor-perf-test * Remove falcor-perf-test from dependency Remove falcor-perf-test from dependency, instead download the binary in github action. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 15 February 2024, 06:19:01 UTC |
7414252 | Lukas Lipp | 14 February 2024, 14:29:55 UTC | cmake: add options to disable gfx, test, example, ... targets (#3572) * cmake: add options to disable gfx, test and example targets * cmake: enable gfx, test, example targets by default * cmake: use same naming scheme * cmake: option to disable slangd and slangc targets * cmake: option for enabling slang-rt target * cmake: option to deactivate llvm and glslang * cmake: better option text * cmake: remove duplicate slang-llvm option * doc: update docs/building.md --------- Co-authored-by: Yong He <yonghe@outlook.com> | 14 February 2024, 14:29:55 UTC |
2e35b08 | Yong He | 12 February 2024, 22:23:53 UTC | Fix #3566. (#3574) | 12 February 2024, 22:23:53 UTC |
0c15582 | Yong He | 12 February 2024, 21:19:35 UTC | Fix lowering of static consts in a generic function. (#3573) * Fix lowering of static consts in a generic function. * Fix. * Fix. * Fix lowering of shading rate builtin. | 12 February 2024, 21:19:35 UTC |
4f7d1f4 | Yong He | 11 February 2024, 09:05:37 UTC | Fix type checking around generic array types. (#3568) | 11 February 2024, 09:05:37 UTC |
03cddba | Yong He | 11 February 2024, 07:05:35 UTC | Fix spirv legalization of nested ararys. (#3567) * Fix spirv legalization of nested ararys. * Fix test. | 11 February 2024, 07:05:35 UTC |
20ab161 | Yong He | 10 February 2024, 06:00:15 UTC | Support link-time constants. (#3564) * Support link-time constants. * Fix. * Fix. | 10 February 2024, 06:00:15 UTC |
f44da6c | Yong He | 09 February 2024, 02:29:32 UTC | Support pointers in SPIRV. (#3561) * Support pointers in SPIRV. * Fix test. * Enhance test. * Fix test. * Cleanup. | 09 February 2024, 02:29:32 UTC |
a16f712 | Jay Kwak | 07 February 2024, 20:12:15 UTC | Implement basic GLSL built-in functions (#3525) * Implement basic GLSL built-in functions Partially resolves #3362 This change implemented GLSL build-in functions described in the following sections of "OpenGL Spec" document. 8.1. Angle and Trigonometry Functions 8.2. Exponential Functions 8.3. Common Functions 8.5. Geometric Functions 8.7. Vector Relational Functions 8.8. Integer Functions About 40 functions are newly implemented and about 150 functions were preexisted on HLSL side implementation. The implementation of new functions hasn't been tested yet. * Unify some of GLSL functions into hlsl.meta.slang Partially resoves #3362 This change moves Some of GLSL functions from glsl.meta.slang to hlsl.meta.slang, because those functions are generic enough to be used for HLSL. Those functions are: dot, normalize, fma, and reflect. There was "fma" for double in hlsl.meta.slang and it is converted to use __BuiltinFloatingPointType type, which required some modifications in diff.meta.slang. The implementation for "fma" in diff.meta.slang is very similar to how "mad" is implemented. * Implement more GLSL built-in functions Partially resolves #3362 This change implements more GLSL built-in functions mentioned in the following sections. 8.4. Floating-Point Pack and Unpack Functions 8.6. Matrix Functions This change implemented 11 new GLSL built-in functions and there were 3 already working functions. The mistake in "normalize" is fixed. "refract" function is moved from glsl.meta.slang to hlsl.meta.slang. * Implement basic GLSL built-in functions Partially resolves #3362 This change implemented GLSL build-in functions described in the following sections of "OpenGL Spec" document. 8.1. Angle and Trigonometry Functions 8.2. Exponential Functions 8.3. Common Functions 8.5. Geometric Functions 8.7. Vector Relational Functions 8.8. Integer Functions About 40 functions are newly implemented and about 150 functions were preexisted on HLSL side implementation. The implementation of new functions hasn't been tested yet. * Unify some of GLSL functions into hlsl.meta.slang Partially resoves #3362 This change moves Some of GLSL functions from glsl.meta.slang to hlsl.meta.slang, because those functions are generic enough to be used for HLSL. Those functions are: dot, normalize, fma, and reflect. There was "fma" for double in hlsl.meta.slang and it is converted to use __BuiltinFloatingPointType type, which required some modifications in diff.meta.slang. The implementation for "fma" in diff.meta.slang is very similar to how "mad" is implemented. * Implement more GLSL built-in functions Partially resolves #3362 This change implements more GLSL built-in functions mentioned in the following sections. 8.4. Floating-Point Pack and Unpack Functions 8.6. Matrix Functions This change implemented 11 new GLSL built-in functions and there were 3 already working functions. The mistake in "normalize" is fixed. "refract" function is moved from glsl.meta.slang to hlsl.meta.slang. * Fix a few minor bugs on GLSL builtin functions Partially resovles #3362 Following bugs were addressed: 1. "bitCounts" had to have a "Capability" on its function declaration. 2. "roundEven" is implemented. It is almost same to "round()" but the behaivor is slightly different the given value is 1.5, 3.5, 5.5 and so on. 3. umulExtended and imulExtended are simplified. 4. exp2 is implemented with "__target_switch" for GLSL and SPIR-V. 5. "tests/glsl-intrinsic/intrinsic-basic.slang" checks the results from the GLSL functions. Currently it is mainly to test if the functions exist or not, but it can now also test for a simple case where the input value is zero and the result is most of the time zero or one. * Disable GLSL exp2 double type tests This change disables some of GLSL exp2 related tests as a workaround. The spir-v needs to handle the double-type argument for exp2 properly. * Fix exp2(double) problem for SPIR-V SPIR-V can handle a double-type input for exp2 with this change. However, the slang-test is will failing to test it with an error message saying, "abort compilation:". With a simpler test case, I verified that SPIR-V assembly code is properly generated for exp2(double) and I am not sure why slang-test is still failing. We will need to revisit this issue later. The simple testing is done with a following line: outputBuffer.result[0] = float(exp2(double(outputBuffer.result[0]))); And it generated following lines and it looks correct: ; Function main %main = OpFunction %void None %3 %5 = OpLabel %16 = OpAccessChain %_ptr_Uniform_float %outputBuffer_0 %int_0 %uint_0 %17 = OpLoad %float %16 %19 = OpFConvert %double %17 %20 = OpFConvert %float %19 %21 = OpExtInst %float %1 Exp2 %20 %22 = OpAccessChain %_ptr_Uniform_float %outputBuffer_0 %int_0 %uint_0 OpStore %22 %21 OpReturn OpFunctionEnd * Add __floatCast that is safer than slang_noop_cast Adding __floatCast that can be used for exp2 function. | 07 February 2024, 20:12:15 UTC |
a95b753 | Yong He | 07 February 2024, 01:31:57 UTC | CI: cancel onging jobs on commit. (#3557) * CI: cancel onging jobs on commit. * test change * Fix. | 07 February 2024, 01:31:57 UTC |
3358b3d | kaizhangNV | 07 February 2024, 01:31:28 UTC | gfx:Add callback to IPipelineCreationAPIDispatcher (#3556) * gfx:Add callback to IPipelineCreationAPIDispatcher Add the callback to IPipelineCreationAPIDispatcher in Vulkan backend in slang-gfx lib. * gfx:add uuid for vulkan pipeline dispatcher Add a define of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher for Vulkan specific IPipelineCreationAPIDispatcher such that libgfx.so can have special handle to Vulkan pipeline dispatcher without break binary compatibility. In the RendererBase::initialize call, we will provide this new UUID when the DeviceType is Vulkan. * gfx: add new variable to GfxGUID Add new variable to GfxGUID IID_IVulkanPipelineCreationAPIDispatcher with initialization of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher to make the implementation aligned with existing GfxGUID::IID_IPipelineCreationAPIDispatcher. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 07 February 2024, 01:31:28 UTC |
f359df9 | Simon Kallweit | 07 February 2024, 01:02:47 UTC | deploy slang-glslang with macos releases (#3554) * deploy slang-glslang with macos releases * sign libslang-glslang.dylib and add it to dist package --------- Co-authored-by: Yong He <yonghe@outlook.com> | 07 February 2024, 01:02:47 UTC |
ab41d54 | Yong He | 07 February 2024, 00:30:31 UTC | Improve Capability System (#3555) * Improve capability system. * Update documentation. * Tuning semantics. * LSP: hierarchical diagnostics. * Fix test. * Fix test. | 07 February 2024, 00:30:31 UTC |
6365e00 | Yong He | 06 February 2024, 17:49:02 UTC | Fix fp16 atomics intrinsics for hlsl. (#3553) | 06 February 2024, 17:49:02 UTC |
b301c93 | Yong He | 06 February 2024, 09:03:42 UTC | Unify GLSL and HLSL buffer block parsing. (#3552) * Unify GLSL and HLSL buffer block parsing. Automatic GLSL module recognition. * Fix. | 06 February 2024, 09:03:42 UTC |
23c65b8 | Yong He | 06 February 2024, 06:36:02 UTC | Add per-buffer data layout control. (#3551) * Add per-buffer data layout control. Fixes #3534. * Fixes. * Robustness. * Update test. * Fix. | 06 February 2024, 06:36:02 UTC |
af035fb | Yong He | 06 February 2024, 04:07:58 UTC | Add glsl implementation of Texture.InterlockedAddF32 (#3550) | 06 February 2024, 04:07:58 UTC |
a88a7db | Jay Kwak | 06 February 2024, 01:03:04 UTC | Implement GLSL build-in functions related to texture (#3544) * Implement GLSL texture related built-in functions Partially resolves #3362 This change implemented GLSL build-in functions described in the following sections of "OpenGL Spec" document. 8.9.1. Texture Query Functions 8.9.2. Texel Lookup Functions 8.9.4. Texture Gather Functions 8.9.5. Compatibility Profile Texture Functions About 200 functions are newly implemented. Most of the functions are calling the HLSL implementation so they are expected to work for all targets but they haven't been tested throughly yet. __TextureImpl got a new generic parameter, "isRectangle", to support sampler2DRect and sampler2DRectShadow. It is a sampler for rectangular texture with no mipmaps. For the reason, its "GetDimentions()" doesn't return mip information. The sampling needs to happen in an integer coordinate not in a normalized [0,1] range. but this hasn't been implemenented yet. Texture functions whose name include "Offset" takes an integer type parameter and those values are required to be a compile-time constant. However, our currentl implementation of slangc seems to make the values not-compile-time constant. As a workaround, the test case uses __LINE__ macro to use a unique numbers so that slangc wouldn't collect them into a runtime variable. I put "constexpr" on "offset" parameters as much as possible. But the issue was still reproduced when targetting SPIRV. Texture functions whose name include "Proj" are emulated by dividing the coordinate value with its last component. For that reason, they take one additional component for its coordinate value. As an example, following function takes two components for sampler1D, instead of one: vec4 textureProj(sampler1D sampler, vec2 p); All shadow samplers stores depth-compare-value at the last component. But sampler1DShadow take one extra component, which is vec3 not vec2. It is unclear what the reason is but the second component is unused in this case. Here is an example, float texture(sampler1DShadow sampler, vec3 p); samplerCubeArrayShadow takes five components for its coordinate and the depth-compare-value cannot be stored in the last component of the cooridnate. It is separated out as an independent parameter, float texture(samplerCubeArrayShadow sampler, vec4 p, float compare); TextureGather functions got some modifications. The existing implementation was calling textureGatherOffset[s] with the parameters in a wrong order. This mistake is corrected. * Bring back GatherCmpRed/Green/Blue/Alpha HLSL has GatherCmpRed/Green/Blue/Alpha functions and it was removed from my previous change by a mistake. This change brings them back. * Disabling two failing tests in intrinsic-texture The new test file, intrinsic-texture.slang, has five test settings and two of them are currently failing; they are targetting HLSL and CPP. This change disables them to avoid confusion. * Remove "isRectangle" parameter from __TextureInfo Partially resolves #3362 This commit has a few changes based on the feedback from the code reviews. 1. Remove "isRectangle" parameter from __TextureInfo, because "sampler2DRect" can be replaced with "sampler2D" that always uses lod level 0. All functions associated to "Rect" are also removed. 2. Enabled tests for "samplerBuffer". 3. Removed "__target_intrinsic(glsl)" from glsl.meta.slang, because we want to stay away from it in the future. 4. Some tests in intrinsic-texture.slang are disabled if the functions take constant offset values or take MultiSample samplers. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 06 February 2024, 01:03:04 UTC |
71439f7 | Yong He | 06 February 2024, 00:15:21 UTC | Add documentation on capability system. (#3549) Fixes #3454. | 06 February 2024, 00:15:21 UTC |
6dca7e3 | Yong He | 03 February 2024, 20:29:12 UTC | Fix spirv emit that leads to pathological downstream time. (#3546) | 03 February 2024, 20:29:12 UTC |
1476489 | Yong He | 03 February 2024, 06:28:02 UTC | Capability type checking. (#3530) * Capability type checking. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 03 February 2024, 06:28:02 UTC |
c15e7ad | Yong He | 03 February 2024, 06:04:40 UTC | Atomics+Wave ops intrinsics fixes. (#3542) * Fix atomics intrinsics, increase kMaxDescriptorSets. * Add SPIRVASM to known non-differentiable insts. * Support fp16 wave ops when targeting glsl. * Fixes. * Fix vk validation errors. * Fix. * Add to allowed failures. | 03 February 2024, 06:04:40 UTC |
a67cb06 | Ellie Hermaszewska | 03 February 2024, 02:14:04 UTC | GLSL Passthrough support for SSBO types (#3446) * GLSL Passthrough support for SSBO types * GLSL Passthrough support for SSBO types * Correctly apply glsl local size layout to entry points during lowering * Test for glsl layout correctness * typo * Reflect GLSL SSBO as raw buffers * Functional test for glsl ssbo * Allow allow glsl for render tests * Functional test for ssbo passthrough * Functional test for ssbo passthrough with spirv-direct * fix windows build error --------- Co-authored-by: Yong He <yonghe@outlook.com> | 03 February 2024, 02:14:04 UTC |
6c8626c | Nathan V. Morrical | 02 February 2024, 20:01:26 UTC | updating readme (#3537) Co-authored-by: Yong He <yonghe@outlook.com> | 02 February 2024, 20:01:26 UTC |
1bc84df | Nathan V. Morrical | 02 February 2024, 20:01:05 UTC | adding required extensions to gfx to enable basic vulkan printf functionality (#3541) | 02 February 2024, 20:01:05 UTC |
f370947 | Yong He | 01 February 2024, 21:26:03 UTC | FP16 atomics for RWByteAddresBuffer, fp32 atomics for images. (#3536) * FP16 atomics for RWByteAddresBuffer, fp32 atomics for images. * Fix spelling. * Add overload. * Fix test failures. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 01 February 2024, 21:26:03 UTC |
a2d2018 | Yong He | 01 February 2024, 07:53:28 UTC | Add slangc option to specialize entrypoint + auto glsl mode. (#3531) * Add slangc option to specialize entrypoint. * Auto enable glsl mode when input file has glsl extension name. * Fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 01 February 2024, 07:53:28 UTC |
2d0912b | Ellie Hermaszewska | 30 January 2024, 19:28:04 UTC | Correctly apply glsl local size layout to entry points during lowering (#3528) * Correctly apply glsl local size layout to entry points during lowering * Test for glsl layout correctness | 30 January 2024, 19:28:04 UTC |
470c5a2 | Yong He | 27 January 2024, 00:30:19 UTC | Fix LSP compatibility issues with Visual Studio. (#3520) * [LSP] compatibility logic for Visual Studio. * [LSP] Fix diagnostic rank parsing. * [LSP] Fix semantic highlighting of cbuffer types. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 27 January 2024, 00:30:19 UTC |
013bcf2 | Yong He | 26 January 2024, 01:47:40 UTC | Fixes for `module` and `include`. (#3519) * Fix type checking of enum cases. * Allow decl to have same name as module. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 26 January 2024, 01:47:40 UTC |
64804ce | Yong He | 25 January 2024, 22:54:46 UTC | Fix spirv legalization generating duplicate array types. (#3517) * Fix spirv legalization generating duplicate array types. * Fix intrinsics. * Update CI build config. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 25 January 2024, 22:54:46 UTC |
7ae8f68 | Yong He | 24 January 2024, 23:49:52 UTC | Update documentation. (#3492) Co-authored-by: Yong He <yhe@nvidia.com> | 24 January 2024, 23:49:52 UTC |
e7b6de3 | Yong He | 24 January 2024, 23:36:49 UTC | [SPIRV] Support `globallycoherent` and `[vk::index()]`. (#3488) * [SPIRV] Support `globallycoherent` modifier. * Fix. * Disable executable cooperative vector tests. * Update expected failure. * [SPIRV] Emit varying output index decoration. * Add test. * Update tests. * Fix test. * Emit `SpvExecutionModeEarlyFragmentTests`. * Lower `StructuredBuffer<bool>`. * Support globallycoherent on ByteAddressBuffer. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 24 January 2024, 23:36:49 UTC |
dd57306 | Pankaj Mistry | 24 January 2024, 21:55:19 UTC | IRSPIRVAsmOperandInst instructions may not have IRBlock as the immediate parent. Previously special case was added to handle IRDecoration similarly. Replace this with a common method getBlock that traverses the parent chain till it gets to the Block (#3486) Fixes bug #3432 | 24 January 2024, 21:55:19 UTC |
70f6ae4 | chloekek | 24 January 2024, 18:24:16 UTC | Correctly refer to ComPtr type in documentation (#3485) The user guide refers to `SlangComPtr`, but the type is actually called `ComPtr` and resides in the `Slang` namespace. Co-authored-by: Yong He <yonghe@outlook.com> | 24 January 2024, 18:24:16 UTC |
1afa78a | chloekek | 24 January 2024, 18:23:52 UTC | Document that D3D11 fragment stage is optional (#3480) It is not required to specify a pixel shader when rasterizing with D3D11. Omitting it is useful when writing to the depth buffer without writing to any render targets. Co-authored-by: Yong He <yonghe@outlook.com> | 24 January 2024, 18:23:52 UTC |
4e7e820 | Ellie Hermaszewska | 24 January 2024, 09:29:09 UTC | Generate lookup tables from cmake (#3461) * Generate lookup tables from cmake * Correct add_custom_command generator dependencies * set options for lookup table source * include path * use slang_add_target for capability generated targets * vs project regenerate * ci wobble --------- Co-authored-by: Yong He <yonghe@outlook.com> | 24 January 2024, 09:29:09 UTC |
ba4baf4 | Yong He | 24 January 2024, 06:58:36 UTC | [LSP] Handle "NotificationReceived" call. (#3481) Co-authored-by: Yong He <yhe@nvidia.com> | 24 January 2024, 06:58:36 UTC |
ad45062 | Yong He | 24 January 2024, 03:37:10 UTC | SPIRV Legalization fixes. (#3479) * Fix CFG legalization for SPIRV backend. * Emit DepthReplacing execution mode. * Fix do-while lowering. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 24 January 2024, 03:37:10 UTC |
1c1d096 | Jay Kwak | 24 January 2024, 00:58:12 UTC | Adding CONTRIBUTION.md (#3472) * Adding CONTRIBUTION.md Fixes #3372 Adding CONTRIBUTION.md that describes the workflow for the contributors at more details. * Add instructions for PR process in CONTRIBUTE.me This commit adds an instruction of how to handle the case when you got feedbacks during Pull Request process. * Fix a formatting problem for Code Style When a word is wrapped with "lessThen" and "greaterThan" characters, it may disappear on the result based on the formatting syntax of .MD file. They need to be wrapped with a single back-tick character to avoid the problem. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 24 January 2024, 00:58:12 UTC |
4d21790 | Jay Kwak | 24 January 2024, 00:57:44 UTC | Fix incorrect behavior of operator% (#3470) * Fix incorrect behavior of operator% Fixes #1059. This change fixes the incorrect translation of "operator%" from HLSL to SPIRV. The issue stems from the fact that the behavior of "operator%" in GLSL differs from that in HLSL. In HLSL it behaves as "remainder" where as it behaves as "modulus" in GLSL. We have been using SpvOpFMod for operator% when Slang compiles from HLSL to SPRIV, which is incorrect. This change switches it to SpvOpFRem. The tests are slightly modified to reveal any potential issues. * Change output type of test/compute/frem For testing the operator%, we are using "int" as the output type of the test, "test/compute/frem.slang". Since the operands are in float type, it is more preferable to have a float type as the resulting type. This can be done with an option, "-output-using-type". --------- Co-authored-by: Yong He <yonghe@outlook.com> | 24 January 2024, 00:57:44 UTC |
af91e77 | kaizhangNV | 23 January 2024, 23:56:21 UTC | Add support for rayQueryGetIntersectionTriangleVertexPositionsEXT (#3463) Add a member function to RayQuery<RAY_FLAG> class GetIntersectionTriangleVertexPositions to support the GLSL built-int rayQueryGetIntersectionTriangleVertexPositionsEXT. Also add new test file under tests/vkray/rayquery-closesthit.slang to test this functionality. | 23 January 2024, 23:56:21 UTC |
5902acd | Yong He | 23 January 2024, 07:19:40 UTC | [LSP] Fetch configs directly from didConfigurationChanged message. (#3478) Co-authored-by: Yong He <yhe@nvidia.com> | 23 January 2024, 07:19:40 UTC |
fec9c42 | Yong He | 22 January 2024, 23:19:26 UTC | Bug fixes for the direct spirv backend. (#3474) * Fix GLSL legalization bug that leads to crash. * Update diagnostic id to avoid conflict. * Fix std140 layout logic. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 22 January 2024, 23:19:26 UTC |
c4e42ab | Yong He | 22 January 2024, 21:13:49 UTC | Fix language server for VS. (#3473) Co-authored-by: Yong He <yhe@nvidia.com> | 22 January 2024, 21:13:49 UTC |
fdc17a9 | Yong He | 20 January 2024, 02:02:40 UTC | Add `-fspv-reflect` support. (#3464) * Add `-fspv-reflect` support. Closes #3462. * Fix. * Fix. * Remove use of `SPV_GOOGLE_hlsl_functionality1`. * Fix spirv validation error. * Fix test. * Update typename hints. * Update commandline options doc. * Remove superfluous empty lines. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 20 January 2024, 02:02:40 UTC |
84b2143 | Nathan V. Morrical | 19 January 2024, 02:52:33 UTC | Docs for local vs global uniform parameters (#3459) | 19 January 2024, 02:52:33 UTC |
c5c1a25 | Yong He | 19 January 2024, 00:46:00 UTC | Capability def parsing & codegen + disjoint sets (#3451) * Capability def parsing & codegen + disjoint sets This change adds a capability definition file, and a code generator to produce C++ code that defines the capability enums and necessary data structures around the capabilities. Extends the existing CapabilitySet class to support expressing disjoint sets of capabilities. This sets up for the next change that will enhance our type checking with reasoning of capability requirements. * Fix cmake. * Fix warning. * Fix. * Fix isBetterForTarget to prefer less specialized option. * Fix. * Fix premake. * Fix intrinsic. * Fix vs sln file. --------- Co-authored-by: Yong He <yhe@nvidia.com> | 19 January 2024, 00:46:00 UTC |
1a13842 | Nathan V. Morrical | 17 January 2024, 23:34:51 UTC | updated docs to more clearly define differences in sizeof(bool) depending on the target platform (#3458) Co-authored-by: Yong He <yonghe@outlook.com> | 17 January 2024, 23:34:51 UTC |
bf2e0fe | kaizhangNV | 17 January 2024, 23:33:36 UTC | Add test to closesthit and anyhit shaders (#3457) Add test to closesthit.slang and anyhit.slang to test the slang stdlib API: HitTriangleVertexPosition. The new test will add the checking for extension declaration, built-in declaration, and built-in variable access. | 17 January 2024, 23:33:36 UTC |
159e318 | kaizhangNV | 17 January 2024, 16:45:15 UTC | Update slang-glslang library (#3449) | 17 January 2024, 16:45:15 UTC |
4cb183c | kaizhangNV | 17 January 2024, 02:56:41 UTC | Update spirv-tools (#3445) Update spirv-tools, spirv-headers and spirv-tools-generated repos. spirv-tools is updated to tag: v2023.6.rc1, branch: vulkan-sdk-1.3.275 commit: 3bb36c2a3f1a72f14e931cc2daca4311733b0014 spirv-headers is updated to branch: vulkan-sdk-1.3.275 commit:1c6bb2743599e6eb6f37b2969acc0aef812e32e3 spirv-tools-generated/*inc, *.h are generated from spirv-tools repo. source/slang/slang-spirv-core-grammar-embed.cpp is generated during slang build. | 17 January 2024, 02:56:41 UTC |
8e90098 | kaizhangNV | 11 January 2024, 20:10:43 UTC | Support for gl_HitTriangleVertexPositionsEXT (#3405) (#3442) * Support for gl_HitTriangleVertexPositionsEXT (#3405) Adding float3 HitTriangleVertexPositions(uint) to slang stdlib to support GLSL gl_HitTriangleVertexPositionsEXT builtin variable under extension of GL_EXT_ray_tracing_position_fetch. This function support emitting GLSL code and spir-V directly. * Update the function name --------- Co-authored-by: Yong He <yonghe@outlook.com> | 11 January 2024, 20:10:43 UTC |
2c08bc4 | skallweitNV | 11 January 2024, 18:36:33 UTC | Add libgfx to macos release (#3444) | 11 January 2024, 18:36:33 UTC |
8dd04c8 | Yong He | 09 January 2024, 20:41:07 UTC | Fix funcs w/ buffer load being treated as readnone. (#3441) Co-authored-by: Yong He <yhe@nvidia.com> | 09 January 2024, 20:41:07 UTC |