efdbb95 | Yong He | 30 May 2024, 01:01:11 UTC | Improve compile time performance. (#3857) * Handle type check cache update on extensions more gracefully. * Correctness fix. * Cache implcit cast overload resolution results. * Fix. * More optimizations. * Cache implicit default ctor resolution. * Disable redundancy removal. * Fix. * Fix test. * Fix. * Correctness fix. * Fix. * Fix, * Fix test. * Small tweak. | 30 May 2024, 01:01:11 UTC |
83f176b | Yong He | 29 May 2024, 18:14:22 UTC | Add options to speedup compilation. (#4240) * Add options to speedup compilation. * Fix. * Plumb options to DCE pass. * Revert debug change. * Fix regressions. * More optimizations. * more cleanup and fixes. * remove comment. * Fixes. * Another fix. * Fix errors. * Fix errors. * Add comments. | 29 May 2024, 18:14:22 UTC |
c1e34c5 | Jay Kwak | 28 May 2024, 18:31:03 UTC | Print memory leak info in Debug build of slangc.exe (#4210) When memory leak is detected, this commit will dump the information about the memory leak. This feature is available only in Debug build on Windows platform. Also note that the message will not be printed on the client applications that use slang.dll, because the printing happens as a part of slangc.exe not slang.dll. I found a bug that Slang::StdWriters was closing `stdout` and `stderr` in its destructor, which prevented Crt functions to print the messages to `stdout` and `stderr`. | 28 May 2024, 18:31:03 UTC |
f6b755d | Jay Kwak | 28 May 2024, 17:53:41 UTC | Simplify test file names for slang-test (#4227) When slang-test.exe ran with a file name doesn't exactly match character-by-character, those tests don't run. This commit alters the file name given from the command-line and it will behave in a more expected way. - "./" are removed. - "../" gets removed along with its parent directory name. - Back-slash characters will be converted to slash on Windows. | 28 May 2024, 17:53:41 UTC |
9323095 | kaizhangNV | 28 May 2024, 01:09:10 UTC | CTS: stage some known failure tests for now (#4226) Stage some known failure test cases, will enable them back when the fix is merged. The failure tests can be checked in https://github.com/shader-slang/VK-GL-CTS/blob/main/test-lists/slang-waiver-tests.xml | 28 May 2024, 01:09:10 UTC |
eefdd4a | skallweitNV | 28 May 2024, 00:05:12 UTC | add support for callable shaders in gfx (#3460) Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com> | 28 May 2024, 00:05:12 UTC |
d9443d6 | Simon Kallweit | 27 May 2024, 13:03:13 UTC | [gfx] metal backend skeleton (#4223) * add metal-cpp submodule * add metal-cpp cmake target * gfx metal backend skeleton * add premake support * add foundation framework * add metal-cpp include to premake * update vs project file --------- Co-authored-by: Simon Kallweit <skallweit@nvidia.com> Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 27 May 2024, 13:03:13 UTC |
4f1cbf6 | exdal | 25 May 2024, 03:07:51 UTC | Fix clang-18 build (#4222) * Update slang-performance-profiler.cpp * modified: source/core/slang-performance-profiler.cpp * reviews --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 25 May 2024, 03:07:51 UTC |
45cc7a1 | ArielG-NV | 24 May 2024, 22:42:48 UTC | If no sample is set with a `Texture(.*)MS[]` operation, set sample to 0. (#4225) * push fix: if no sample, set to 0 for textureMS * push fixes to hlsl [] operator + test so it will error | 24 May 2024, 22:42:48 UTC |
9553a7c | cheneym2 | 24 May 2024, 15:24:53 UTC | Fix pointer example (#4224) * Fix pointer example Make the example shown for pointers something that would compile. Don't redefine pNext and do define MyType. * Fix formatting of struct in pointer example | 24 May 2024, 15:24:53 UTC |
ef6dd44 | cheneym2 | 24 May 2024, 05:36:40 UTC | Fix pointers link in userguide (#4217) Adding (limited) to the header in a previous doc change broke the link. Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 24 May 2024, 05:36:40 UTC |
8e549ee | kaizhangNV | 24 May 2024, 00:51:39 UTC | CTS: Report error when CTS fails (#4219) The CTS nightly stops report error because of `continue-on-error` is set to true. Remove that field such that it will fail the job. Add slack notification about the CTS status, this will report the status of CTS nightly result to our slack dev channel. | 24 May 2024, 00:51:39 UTC |
a4cc5b0 | cheneym2 | 23 May 2024, 20:30:46 UTC | Update vk-gl-cts-nightly.yml (#4214) Increase timeout from 100 to 180 minutes | 23 May 2024, 20:30:46 UTC |
8e15bdc | ArielG-NV | 22 May 2024, 13:18:22 UTC | Fix all Clang-14 warnings (#4203) * fix all Clang-14 warnings * remove a clang-14 warning fix because it is a MSVC warning... | 22 May 2024, 13:18:22 UTC |
52b5bb4 | Jay Kwak | 21 May 2024, 01:46:46 UTC | This commit increases the minimum CMake version from 3.20 to 3.25. (#4193) I was trying to see if I can lower it to 3.16, but I found that we are currently using CMake feature that requires a version 3.25 not 3.20. This finding is not new. I made a similar change to CMakePresets.json a few days ago. At that time, I didn't realize that the same change had to be made for CMakeList.txt as well. | 21 May 2024, 01:46:46 UTC |
e913cb9 | Jay Kwak | 20 May 2024, 15:49:25 UTC | Printing a timing of stdlib build time (#4190) | 20 May 2024, 15:49:25 UTC |
07c29d8 | ArielG-NV | 20 May 2024, 04:13:42 UTC | Emit execution mode of type per entry point once. Emit SPIRV capability once per shader program. (#4189) * Emit only 1 execution mode of type per entry point Added a dictionary<SpvWord,Hash<ExecutionMode>> to ensure we don't emit multiple. * get inst->id directly * address review + fix test --------- Co-authored-by: Yong He <yonghe@outlook.com> | 20 May 2024, 04:13:42 UTC |
62b7219 | Yong He | 18 May 2024, 06:07:36 UTC | Add `-minimum-slang-optimization` to favor compile time. (#4186) | 18 May 2024, 06:07:36 UTC |
4036043 | Jay Kwak | 18 May 2024, 01:10:35 UTC | SPIR-V support for GLSL texture functions (#4184) * SPIR-V support for GLSL texture functions Closes #4147 This commit implements GLSL texture functions with SPIR-V intrinsics. It also implements some of missing GLSL implementations. - textureProj - textureLod - texelFetchOffset - textureProjOffset - textureLodOffset - textureProjLod - textureProjLodOffset - textureGrad - textureGradOffset - textureProjGrad - textureProjGradOffset * Fix SPIR-V issues discovered while improving the test case. * Add __requireComputeDerivative() whenever sampling * Do not touch GetDimensions | 18 May 2024, 01:10:35 UTC |
0a5908d | Jay Kwak | 17 May 2024, 23:29:23 UTC | Test binding index for combined and not-combined textures (#4180) | 17 May 2024, 23:29:23 UTC |
42b0248 | Jay Kwak | 17 May 2024, 17:08:03 UTC | Add warning about CMake version on CONTRIBUTION.md Currently CMake version is required to be 3.20 or above. The version requirement is properly defined in our CMakeList.txt file. But older versions of CMake may not even print an error about the version requirement. | 17 May 2024, 17:08:03 UTC |
9f786fd | kaizhangNV | 17 May 2024, 16:43:08 UTC | capture/relay: Add capture interface classes (#4177) * capture/relay: Add capture interface classes Add `ModuleCapture` class for capturing `IModule` - The `IModule` can only be created from -- `ISession::loadModule` -- `ISession::loadModuleFromIRBlob` -- `ISession::loadModuleFromSource` -- `ISession::loadModuleFromSourceString` so, we create the `ModuleCapture` at those methods in `SessionCapture` class. We use a hash map to store a map from `IModule` to `ModuleCapture` to avoid creating new `ModuleCapture` when there is already an old one. - In `SessionCapture::getLoadedModule`, we will assert on not finding a `ModuleCapture` instance. Add `EntryPointCapture` class for capturing `IEntryPoint`. - The `IEntryPoint` can only be created from: -- `IModule::findEntryPointByName` -- `IModule::findAndCheckEntryPoint` so, we create the `EntryPointCapture` at those methods in `ModuleCapture`. Similarly, we use a hash map to store a map from `IEntryPoint` to `EntryPointCapture`. - In `IModule::getDefinedEntryPoint`, we will assert on not finding a `EntryPointCapture` instance. Add `CompositeComponentTypeCapture` class for capturing CompositeComponentType, but since user is only exposed to `IComponentType`, so `CompositeComponentTypeCapture` just inherits from `IComponentType`. - `CompositeComponentType` can only be created from: -- ISession::createCompositeComponentType so create it here. Add `TypeConformanceCapture` class for capturing `ITypeConformance`. - The `ITypeConformance` can only be created from: -- `ISession::createTypeConformanceComponentType` so create it here. In addition, because `EntryPointCapture` and `ModuleCapture` share a some base class `IComponentType`, we generate the COM GUID for those two classes to differentiate them. * Fix the build issue * Add nullptr check for output parameter * define the SLANG_CAPTURE_ASSERT macro used in both debug and release build | 17 May 2024, 16:43:08 UTC |
000396c | ArielG-NV | 17 May 2024, 04:02:49 UTC | ignore capability system skips the capability pass 100% now (#4183) | 17 May 2024, 04:02:49 UTC |
99ebb1a | ArielG-NV | 17 May 2024, 02:46:24 UTC | Update 03-convenience-features.md (#4179) add member init expr and constructor logic to the docs | 17 May 2024, 02:46:24 UTC |
725735a | Yong He | 16 May 2024, 17:43:49 UTC | RasterizerOrder resource for spirv and metal. (#4175) * RasterizerOrder resource for spirv and metal. Also fixes the byte address buffer logic for metal. * Fix. * Delete commented lines. --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 16 May 2024, 17:43:49 UTC |
0a61802 | Hai Nguyen | 16 May 2024, 14:40:58 UTC | Fixes running examples from generated SLN (#4173) * Fixes running examples from generated SLN This CL contains changes to CMakeLists.txt that enables the examples to run from within Visual Studio when using CMake generated solution. Previously the working directory was set to examples/<example name> and which resulted in an invalid path in the generated project files. Additionally, the assets (shaders, images, models) were not in location that was accessible to the executable when ran from within Visual Studio. - Changed examples to use ${CMAKE_BINARY_DIR}/${dir} instead of ${dir} if generator is MSVC. - Add custom target to assets (shaders, images, models, etc) to example subdir under ${CMAKE_BINARY_DIR} - Add dependency to copy prebuilt binaries if building examples in MSVC so DirectX shader signing doesn't fail - Changed copy-prebuilt-binaries to use copy_if_different to avoid redundant copies The initial build time is increased by 20 seconds (16%) from 2m3s to 2m23s, due to the asset copy. The incremental build time remained same at 4 seconds. * Corrected tabs to spaces Corrected unintentional use of tabs instead of spaces. --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com> | 16 May 2024, 14:40:58 UTC |
1b89f78 | ArielG-NV | 16 May 2024, 04:04:12 UTC | Capabilities System, CapabilitySet Logic Overhaul (#4145) * Capabilities System, Backing Logic Overhaul Fixes #4015 Problems to address: 1. Currently the capabilities system spends anywhere from 25-50% of compile time on the CapabilityVisitor. Most of this time is spent on join logic: 1. Finding abstract atoms 2. Comparing list1<->list2. This should and can be made significantly faster. 2. Error system does not produce errors with auxiliary information. This will require a partial redesign to provide more useful semantic information for debugging. What was addressed: 1. Array backed `CapabilityConjunctionSet` was replaced in-favor for a `UIntSet` backed `CapabilityTargetSets`. The design is described below. Design: * `CapabilityTargetSets` is a `Dictionary<targetAtom, CapabilityTargetSet>`. This is not an array for 2 reasons: 1. Easy to figure out which target is missing between two `CapabilityTargetSets` 2. To statically allocate an array requires the preprocessor to manually annotate which Capability is a target and link that Capability to an index. This means a dictionary is required for lookup regardless of implementation. * `CapabilityTargetSet` is an intermediate representation of all capabilities for a singular `target` atom (`glsl`, `hlsl`, `metal`, ...). This structure contains a dictionary to all stage specific capability sets for fast lookup of stage capabilities supported by a `CapabilitySet` for a `target` atom. This reduces number of sets searched. * `CapabilityStageSet` is an intermediate representation of all capabilities for a singular `stage` atom (`vertex`, `fragment`, ...). This structure holds all disjoint capability sets for a `stage`. A disjoint set is rare, but may exist in some scenarios (as an example): `{glsl, EXT_GL_FOO}{glsl, _GLSL_130, _GLSL_150}`. This reduces the number of sets searched. * `UIntSet` is the main reason for the redesign for better performance and memory usage. All set operations only require a few operations, making all set logic trivial and with minimal cost to run. All algorithms were modified to focus around `UIntSet` operations. 2. Errors * Semantic information are now better linked to the calling function to provide a connection of function<->function_body for when saving semantic information for errors. * Missing targets now print errors much like other error code by finding code which could be a cause of incompatibility. What is missing: 1. Add non naive support for non-stage specific capabilities such as `{hlsl, _sm_5_0}`. Currently non stage specific targets emulate the behavior through assigning such capabilities to every stage: `{hlsl, _sm_5_0, vertex} {hlsl, _sm_5_0, fragment}...`. Removal of this behavior would remove redundant shader stage sets being made at construction time (~80% of new implementation runtime). This is an addition, not an overhaul. 2. Optionally: `UIntSet` should be modified to support SIMD operations for significantly faster operations. This is not required immediately since `UIntSet` is already not a performance constraint. Notes: * UIntSet had implementation bugs which were fixed in this PR. * The old capabilities system had bugs which were fixed in this PR when transforming to the new implementation. * fix .natvis debug view * Small optimizations I found while working on the addition the AST building pass looks like so now: 1% = ~capabilitySet 2% = capabilitySet() 1.5% capabilitySet::unionWith() 0.8% capabilitySet::join() 1.5% auxillary info for debugging ~0.5-1% extra visitor overhead ~5% total for the visitor ~6.5% for total runtime costs * fix caps which were wrong but worked * push minor syntax fix (still looking for why other tests fail) * perf & bug fixes 1. did not properly remake isBetterForTarget for this->empty case with that as Invalid. This is best case in this senario. 2. Remade seralizer for stdlib generation. Faster (more direct) & cleaner code. NOTE: did not address review comments * fix glsl.meta caps error * fixing findBest logic again & UIntSet wrapper findBest was not checking for 'more specialized' targets & was element counter was flawed * faster getElements algorithm + natvis for UIntSet + wrong warning * type incompatability of bitscanForward implementations * try to fix warnings again * remove ptr for clang intrinsic * add missing header * ifdef to allow clang compile * compiler hackery to fix up platform/type independent operations * bracket * fix MSVC error * missing template * change types out again * changes to fix compiling * adjustment to parameter for Clang/GCC * added iterator to delay processing all atomSets of a CapabilitySet * add a few missing consts's * ensure we never have more than 1 disjointSet Added a wrapper + assert + union functionality to all possible disjoint sets. This was done in favor of a removal of the LinkedList for 2 reasons: 1. We still need 0-1 set functionality. 2. Might as well keep the code, just disallow the problematic functionality. * address review comments non linked-list refactor review comments addressed; add doc comments + remove redundant code * comments + remove isValid for bool operator * push removal of linkedlist for capabilities * add missing break * address review comments minor adjustments of syntax * push a fix to the `CapabilitySet({shader, missing target})` code * quality + error 1. add iterator to UIntSet 2. do not specialize target_switch if profile is derived from case (GLSL_150 is not compatable with GLSL_400) * fix target_switch erroring + temporarily remove UIntSet::Interator temporarily remove UIntSet::Interator. It will be added after, testing code on CI first so I can multi-task fixing the UIntSet Iterator * fix the UIntSet iterator * Revert "fix the UIntSet iterator" temporarily to pull from master * add metal error as per texture.slang (took a while I realize this was why things were breaking, likely should adjust errors to reflect this) * Rework UIntSet to have a template for output type This is done so it is reasonable to debug the iterator output and not just dealing with messy int's Fix problems with the iterators implemented + invalid capabilities handling * removed incorrect `__target_switch` capability barycentric was being used with anticipation of `profile glsl450`, this does not expand into `GL_EXT_fragment_shader_barycentric`, this instead caused an error which is hidden during cross-compile. * remove some uses of getElements * remove undeclared_stage for now * remove redundant code associated with `undeclared_stage` * remove unused variable * address review specifically to note removed static in a thread dangerous scope. Now using a `const static` for read only (thread safe) which precompile steps generate * move GLSL_150 capdef change to sm_4_1 (more accurate) * address most review comments did not address: https://github.com/shader-slang/slang/pull/4145#discussion_r1602256776 * revert incorrect code review suggestion * push changes for all code review suggestions | 16 May 2024, 04:04:12 UTC |
3b0de8b | Yong He | 16 May 2024, 01:07:36 UTC | Add diagnostic to prevent defining unsized variables. (#4168) * Add diagnostic to prevent defining unsized static variables. * Fix tests. * Add more tests. * Fix to allow defining variables of link-time size. * update diagnostic message. * Fix tests. * Simplify code. | 16 May 2024, 01:07:36 UTC |
cc88530 | Jay Kwak | 15 May 2024, 03:28:28 UTC | Support combined textures for Metal target (#4169) | 15 May 2024, 03:28:28 UTC |
4edc72e | Yong He | 15 May 2024, 01:01:31 UTC | Remove use of `G0` and `__target_intrinsic` in stdlib. (#4170) * Remove use of `G0` and `__target_intrinsic` in stdlib. * Fix. * Fix calling intrinsic in global scope. | 15 May 2024, 01:01:31 UTC |
d76bed6 | Jay Kwak | 14 May 2024, 22:42:12 UTC | Implement texture functions for Metal target (#4158) * Impl texture APIs for Metal target This commit is to implement texture functions for Metal target. The following functions are implemented and tested. - GetDimensions() - CalculateLevelOfDetail() - CalculateLevelOfDetailUnclamped() - Sample() - SampleBias() - SampleLevel() - SampleCmp() - SampleCmpLevelZero() - Gather() - SampleGrad() - Load() Metal has limited support for the texture functions compared to HLSL. - LOD is not supported for 1D texture, - Depth textures are limited to 2D, 2DArray, Cube and CubeArray textures. - "Offset" variants are limited to 2D, 2DArray, 2D-Depth, 2DArray-Depth and 3D textures. The functions that cannot be implemented for Metal should properly be handled by the capability system later. * Fix the failing test, multi-file.hlsl I am not sure why this change is needed. * Fix compile errors on macOS 2nd try * Remove a typo character to fix the compile error * Trivial clean up * Remove `as_type` where it was intended as static_cast * Use a simpler sytax for __intrinsic_asm * Trivial clean up * Remove TEST_AFTER_FIXING_CAPABILITY_PROBLEM after fixing normalize * Fix the failing test properly * Fix an incorrect setup of Depth-cube texture --------- Co-authored-by: Yong He <yonghe@outlook.com> | 14 May 2024, 22:42:12 UTC |
5ceb856 | Sai Praveen Bangaru | 14 May 2024, 22:29:09 UTC | Fix CFG reversal logic for loops (#4162) Handles a corner case where the first block after the condition on the true-side is another condition. This would currently result in an invalid reverse graph, where the reverse version of the true-block is the merge point for two different branching insts (the reverse version of the loop as well as the second condition). This patch simply adds a blank block when constructing the reverse-loop (similar to critical edge breaking) so that each branch inst in the reversed loop has a unique merge block. | 14 May 2024, 22:29:09 UTC |
291b4cd | cheneym2 | 14 May 2024, 18:05:58 UTC | Slang: Support UTF-8 with Byte Order Markers (#4135) Slang APIs are documented as taking UTF-8 encoded shader source, though it's not explicitly documented whether it is allowed to include a BOM (Byte Order Marker). This change adds support for UTF-8 BOM markers by virtue of disposing of BOM data. As a bonus, UTF-16 input which can cleanly decode to UTF-8 is now also accepted. Throwing out the BOM on input is done by leveraging existing functionality in "determineEncoding()", however a bug exists there for null-terminated single character input, where the null byte caused a heuristic to guess UTF-16, even though the null byte isn't part of the string. The bug in "determineEncoding" is fixed by only guessing when bytes >= 2 and not looking past the end of the buffer. The 'implicit-cast' test was mistakenly relying on the bug to pass, as its expected file was being read as UTF16 and cropped to zero length due to the bug. The expected output of implicit-cast is updated to pass with the bug fix in place. The decoding of UTF-16 to UTF-8 is done through an existing 'decode' method. This change fixes a bug in UTF16-LE 'decode' where it was decoded as if it were Big-Endian. Adds 3 small tests to ensure the compiler doesn't choke on source files in UTF-8 (with BOM), UTF16-LE, or UTF16-BE. Bonus: Fixes a bug in diagnostic reporting where hex values were incorrectly translated to text, leading to incorrect, possibly truncated strings. Fixes #4046 Co-authored-by: Yong He <yonghe@outlook.com> | 14 May 2024, 18:05:58 UTC |
9ab24cf | Yong He | 14 May 2024, 15:24:07 UTC | Propagate warning settings on `Linkage` to IR passes. (#4156) | 14 May 2024, 15:24:07 UTC |
487ae03 | Sriram Murali | 14 May 2024, 06:57:57 UTC | Add LoadAligned and StoreAligned methods to ByteAddressBuffers (#4066) Fixes #4062 This change enables wide load/stores for byte-address-buffer backed resources, when the data is accessed at an offset that is aligned. **Goals** - Improve performance by issuing wider instructions instead of sequence of scalar instructions, for load and stores of byte-address buffers. - Reduce code-size and readability of the generated shaders. - Help naive users as well as ninja programmers, generate optimal code. **Non Goals** - Help with Structured buffers, or other resources. - Target compilation time improvements. **Key changes** Adds 2 new overloads for Load and Store operations on ByteAddress Buffers. 1. Load / Store with an extra alignment parameter ``` resource.Load<T>(offset, alignment); resource.Store<T>(offset, value, alignment); ``` 2. LoadAligned / StoreAligned with no extra parameter, with the same signature as orignial Load / Store. ``` resource.LoadAligned<T>(offset); resource.StoreAligned<T>(offset, value); ``` - This overload will implicitly identify the alignment value, from the base type T of the elementary unit of the resource. **Supported resources** 1. Vectors This can be upto 4 elements, i.e. float -- float4. 2. Arrays This does not have a limit on number of elements, but on a conservative estimate, we can limit to few hundreds. 3. Structures This is used to group a resource of a single type. ``` struct { float4 x; } ``` **Code updates** - Modified byte-address-ir legalize to handle struct, array and vector kinds of load or store access - Added custom hlsl stdlib functions to implement all the overloads for Load, Store etc. - Added C-like emitter, SPIR-V emitter for handling ByteAddressBuffers. - Added a new core stdlib function intrinsic to wrap around alignOf<T>(). - Added a new peephole optimization entry to identify the equivalent IntLiteral value from the alignOf<T>() inst. - Added tests to check explicit, and implicit aligned Load and Store operations. | 14 May 2024, 06:57:57 UTC |
9f23046 | skallweitNV | 13 May 2024, 22:39:49 UTC | [gfx] specify resource view buffer range in bytes (#4149) * refactor gfx buffer range to use byte range * create buffer view with zero struct stride for ClearUnorderedAccessViewUint/Float * create buffer descriptors on demand * avoid copying gfx.dll --------- Co-authored-by: Yong He <yonghe@outlook.com> | 13 May 2024, 22:39:49 UTC |
04d3dd5 | Jay Kwak | 13 May 2024, 21:22:21 UTC | Update CONTRIBUTION.md Clarify which `slang.sln` file needs to be used for cmake workflow. | 13 May 2024, 21:22:21 UTC |
e005415 | skallweitNV | 11 May 2024, 22:11:44 UTC | add missing Result to IRayTracingCommandEncoder::bindPipline (#4148) | 11 May 2024, 22:11:44 UTC |
86a9da1 | kaizhangNV | 11 May 2024, 00:32:09 UTC | Fix race-condition and visual artifacts issues (#4152) * Fix race-condition and visual artifacts issues In PerformanceProfiler::getProfiler() we return a static object for the profiler implementation, this is not thread-safe, so change it to thead_local. There is still some visual artifacts when using slang as the shading language. We don't know the root cause yet, but found out it's related to our loop inversion algorithm. So stage this feature for now, and turn it into an internal option and default off. We will re-enable it after more investigation on this optimization. File an new issue 4151 to track it. * Add '-loop-inversion' to the few tests | 11 May 2024, 00:32:09 UTC |
1dcd814 | Yong He | 10 May 2024, 16:41:31 UTC | More Metal Intrinsics. (#4143) | 10 May 2024, 16:41:31 UTC |
926009a | Tomáš Pazdiora | 10 May 2024, 01:17:38 UTC | fix typo (#4144) Co-authored-by: Yong He <yonghe@outlook.com> | 10 May 2024, 01:17:38 UTC |
b446218 | Sai Praveen Bangaru | 09 May 2024, 14:03:46 UTC | Add stdlib tests for `clamp` derivatives which also checks `max` and `min` derivatives (#4136) * Add stdlib tests for `clamp` derivatives which also checks `max` and `min` derivatives * Extend test | 09 May 2024, 14:03:46 UTC |
bf088c3 | Yong He | 09 May 2024, 06:06:46 UTC | Metal: propagate and specialize address space. (#4137) | 09 May 2024, 06:06:46 UTC |
526430a | Yong He | 09 May 2024, 06:05:14 UTC | Support `getAddress` of a single-element vector swizzle. (#4138) Fixes #4112. | 09 May 2024, 06:05:14 UTC |
8e86121 | Yong He | 09 May 2024, 03:52:36 UTC | Support `[__ref]` attribute to make `this` pass by reference. (#4139) Fixes #4110. | 09 May 2024, 03:52:36 UTC |
448e21a | Yong He | 09 May 2024, 03:52:09 UTC | `slangc` tool experience improvements. (#4140) * `slangc` tool experience improvements. Fixes #4123. Fixes #4127. * Update doc. | 09 May 2024, 03:52:09 UTC |
756ce3d | Yong He | 09 May 2024, 03:23:38 UTC | Fix legalization of `kIROp_GetLegalizedSPIRVGlobalParamAddr`. (#4141) | 09 May 2024, 03:23:38 UTC |
708345d | kaizhangNV | 08 May 2024, 19:25:11 UTC | Fix crash in obfuscation (#4134) Slang crashes during obfuscation because of referencing the nullptr pointer. Add the checking. In addition, above situation happens when user provide an empty slang shader with '-obfuscate' option, we shouldn't do anything in that case. So add an early return in obfuscateModuleLocs if no IR code is actually generated. | 08 May 2024, 19:25:11 UTC |
6d917a0 | Yong He | 08 May 2024, 17:41:52 UTC | Fix NonUniformResourceIndex legalization for SPIRV. (#4133) * Fix NonUniformResourceIndex legalization for SPIRV. * Update gh-4131.slang | 08 May 2024, 17:41:52 UTC |
7514d0b | Yong He | 08 May 2024, 17:22:40 UTC | Add github action to ensure PRs are labeled. (#4130) * Add github action to ensure PRs are labeled. * Update. * Fix. * Fix * Fix * more Fix * more fix. * try. * fix * another try. --------- Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 08 May 2024, 17:22:40 UTC |
93e5b71 | skallweitNV | 08 May 2024, 17:19:08 UTC | [gfx] Cache mutable root shader object in Vulkan (#4119) * fix comment * add caching of mutable root shader objects in vulkan * Fix. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 08 May 2024, 17:19:08 UTC |
4f2330d | kaizhangNV | 08 May 2024, 16:13:45 UTC | capture/replay: interface implementation 1 (#4122) * capture/replay: interface implementation 1 - Add global session, filesystem, and session capture interface classes: GlobalSessionCapture for IGlobalSession FileSystemCapture for ISlangFileSystemExt SessionCapture for ISession - Add environment variables to enable it The 2 variables are SLANG_CAPTURE_LAYER and SLANG_CAPTURE_LOG_LEVEL SLANG_CAPTURE_LAYER: In slang_createGlobalSession(), after the compiling/loading stdlib, we will check the capture environment variable, if it's set to 1, we will create a GlobalSessionCapture object and return to user code. SLANG_CAPTURE_LOG_LEVEL: This is to set the log level, user can choose the loglevel to debug. (We can remove this when the feature is fully implemented). - Update premake file and cmake file to add the capture/replay source folder * Fix Windows build error Fix windows build error by adding the "SLANG_MCALL" keyword. Change to use Slang::ComPtr for those captured object pointers to simplify the resource management. Use __func__ macro to print the function name in the log. | 08 May 2024, 16:13:45 UTC |
eb39708 | Yong He | 08 May 2024, 04:50:41 UTC | Make sure pointer local vars have `AliasedPointer` decoration. (#4132) | 08 May 2024, 04:50:41 UTC |
997f040 | Jay Kwak | 07 May 2024, 15:27:27 UTC | Support Metal math functions (#4118) * Support Metal math functions Closes #4024 Note that Metal document says Metal doesn't support "double" type; "Metal does not support the double, long long, unsigned long long, and long double data types." According to Metal document, math functions are not defined for integer types. That leaves only two types to test: half and float. As a code clean up, __floatCast is replaced with __realCast. But I had to add a new signature that can convert from integer to float. Some of GLSL functions are moved to hlsl.meta.slang. For those functions, there isn't builtin functions for HLSL but there are for GLSL and Metal. "nextafter(T,T)" is currently not working because it requires Metal version 3.1 and we invoke metal compiler with a profile version lower than 3.1. * Changes based on review comments. | 07 May 2024, 15:27:27 UTC |
1b3a428 | Yong He | 07 May 2024, 02:21:03 UTC | Support groupshared variables for Metal. (#4116) | 07 May 2024, 02:21:03 UTC |
618428a | Yong He | 06 May 2024, 21:53:27 UTC | Delete `wrap-global-context` pass. (#4114) * Delete `wrap-global-context` pass. The pass was added for the metal backend without realizing that the existing `explicit-global-context` does 99% of the job. Instead of duplicating the logic in a different pass for metal, we extend same explicit-global-context pass to work for metal. * Fix build. | 06 May 2024, 21:53:27 UTC |
2220d26 | Yong He | 04 May 2024, 04:56:59 UTC | Fix macos release script. (#4106) | 04 May 2024, 04:56:59 UTC |
7db3986 | Yong He | 04 May 2024, 04:56:39 UTC | Fix mistake in WaveMatch intrinsic. (#4105) | 04 May 2024, 04:56:39 UTC |
59903ef | Yong He | 04 May 2024, 01:02:31 UTC | Add host shared library target. (#4098) * Add host shared library target. * Attempt fix. * Fix warnings. * try fix. * Fix test. * Fix. | 04 May 2024, 01:02:31 UTC |
54153a3 | Yong He | 03 May 2024, 22:23:23 UTC | Don't bottleneck Wave intrinsics through `WaveMask*` for spirv. (#4099) * Don't bottleneck Wave intrinsics through `WaveMask*` for spirv. * Fix. | 03 May 2024, 22:23:23 UTC |
47a917c | Yong He | 03 May 2024, 19:18:47 UTC | Fix `Ptr::__subscript` to accept any integer index. (#4100) * Fix `Ptr::__subscript` to accept any integer index. * Fix `Ptr::__subscript` to allow 64bit indices. | 03 May 2024, 19:18:47 UTC |
13250ff | Jay Kwak | 03 May 2024, 17:06:39 UTC | Utilize vector operations over scalar if possible (#4092) * Utilize vector operations over scalar if possible Closes #4085 * Fix for the failing CI [ForceUnroll] is removed because it changed the emitted SPIR-V code a little differently for half-conversion.slang. SPIR-V code style is changed to a more preferred style, from "OpXX $$T result $x" to "result:$$T = OpXX $x" | 03 May 2024, 17:06:39 UTC |
1863fe1 | Yong He | 02 May 2024, 23:48:27 UTC | Support generic constraints that are dependent on another generic param. (#4091) | 02 May 2024, 23:48:27 UTC |
7ef980f | Sai Praveen Bangaru | 02 May 2024, 23:46:59 UTC | Fix unzipping logic for inout non-diff parameters and adjust tests (#4090) * Fix unzipping logic for inout non-diff parameters and adjust tests + Removed `-g0` from `struct-this-parameter.slang` test. Works correctly with the new unzipping logic. + Removed `-g0` from `was/warped-sampling-1d.slang` test. Works correctly with DX12 & CS_5_1. CS_5_0 appears to run into an FXC compiler bug with detecting infinite loops where there don't appear to be any. * Update slang-ir-autodiff-unzip.h * Update warped-sampling-1d.slang | 02 May 2024, 23:46:59 UTC |
6b30957 | cheneym2 | 02 May 2024, 23:01:43 UTC | Slang: update pointer related documentation (#4088) Slang does have some support for pointers. Remove an outdated comment stating the contratry, and update the section that describes pointer support to also list some relevant limitations. Fixes #3970 Co-authored-by: Yong He <yonghe@outlook.com> | 02 May 2024, 23:01:43 UTC |
c763750 | Sai Praveen Bangaru | 02 May 2024, 23:01:21 UTC | Handle case where types can be used as their own `Differential` type. (#4057) * Avoid synthesis for when types can be used as their own differenial + Add test * Add missing files.. * Fix issue with method synthesis for self-differential types + Add a generic test * Fix * Fix issue with out-of-date type resolution cache. Witness tables created during the conformance checking phase not being taken into account during the decl type resolution phase because the epoch is not updated after conformance checking. This leads to certain complex associated-type lookup chains (such as the one in tests/compute/assoctype-nested-lookup) not resolving properly and causing errors. * Delete self-differential-type-synthesis-extension.slang * Quick fix to repopulate stdlib cache for deferred stdlib loading * Update slang-check-decl.cpp | 02 May 2024, 23:01:21 UTC |
e5d49cf | kaizhangNV | 02 May 2024, 20:05:18 UTC | Allow multiple _AttributeTargets for attribute declaration (#4087) The syntax like: [__AttributeUsage(_AttributeTargets.Var)] [__AttributeUsage(_AttributeTargets.Param)] struct DefaultValueAttribute { int iParam; }; is allowed. For user-defined attribute, we can specify more attribute targets on the attribute declaration. So one attribute can be used in more than one situations. | 02 May 2024, 20:05:18 UTC |
f7d54af | Jay Kwak | 02 May 2024, 18:56:13 UTC | Fix fmod behavior targetting GLSL and SPIR-V (#4080) * Fix fmod behavior targetting GLSL and SPIR-V The default implementation of fmod was doing "Modulo" operation when "fmod" in HLSL should do "remainder" operation. * Fix a mistake in `fmod` GLSL target When using __intrinsic_asm, the "if" logic wasn't emitted. "__intrinsic_asm" had to be called from a new function and `fmod` had to call it. Alternatively, I am using `operator?()` to workaround. A similar modification is made to `roundEven()` hoping for a better performance. | 02 May 2024, 18:56:13 UTC |
679a457 | Jay Kwak | 02 May 2024, 16:59:45 UTC | Implement SPIR-V target for GLSL functions (#4083) Fixes #4051 This commit implements SPIR-V target for GLSL functions. It also fixes a few problesm of GLSL targetting implemention too. | 02 May 2024, 16:59:45 UTC |
d53d793 | kaizhangNV | 02 May 2024, 16:22:44 UTC | Fix reflection-test issue (#4082) (#4084) The reflection test doesn't print the user attributes decorating for the variables, only types. Therefore, add the print for user attributes of variables. | 02 May 2024, 16:22:44 UTC |
b490414 | Yong He | 02 May 2024, 04:38:24 UTC | Delete out-of-date assert. (#4079) | 02 May 2024, 04:38:24 UTC |
436b22f | Jay Kwak | 02 May 2024, 03:26:28 UTC | Fix/replace target intrinsic to target switch part 2 (#4058) * Fix texture capabilities * Remove more __target_intrinsic and fix capability for texture Fixes #3906 With this commit, following functions will use __target_switch: - abs - asdouble - clamp - min - max - EvaluateAttributeSnapped - frexp - log10 - modf - __glsl_textureXXX For an unknown reason, I couldn't get "min(int,int)" working with __target_switch. It causes a test failure in Falcore unit test. --------- Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 02 May 2024, 03:26:28 UTC |
08de73a | kaizhangNV | 02 May 2024, 01:29:39 UTC | Copy default target's optionSet to code-gen target's optionSet (#4073) In current implementation, the some options will be to added to the target that is only specified by command line "-target". But if user specifies the target by just using slang API, e.g. 'spAddCodeGenTarget', those options will be missed. To fix the problem, we copy the default target's options to the code-gen target's option set. The default target will only be useful when there is no target specified in the command line. | 02 May 2024, 01:29:39 UTC |
9043bc5 | Yong He | 02 May 2024, 00:30:55 UTC | Fix compile failures when using debug symbol. (#4069) * Fix compile failures when using debug symbol. * Various fixes. * Fix intrinsic. * Fix test. | 02 May 2024, 00:30:55 UTC |
0bb826f | Yong He | 01 May 2024, 23:44:22 UTC | SPIRV: Fix performance issue when handling large arrays. (#4064) * SPIRV: Fix performance issue when handling large arrays. * Add test for packing. * Fix clang. | 01 May 2024, 23:44:22 UTC |
4533c82 | cheneym2 | 01 May 2024, 23:16:38 UTC | SPIRV: Fix storage class for unwrapped pointers (#4068) In SPIRV legalization, a struct wrapper is created around push constants but is not itself legalized. Putting the struct type into the work list causes the storage access of the push constant pointer to be PhysicalStorageBuffer as expected, instead of Function scope that was produced without the added struct legalization. Adds a SPIRV test that exercises the fix. Fixes #3946 Co-authored-by: Yong He <yonghe@outlook.com> | 01 May 2024, 23:16:38 UTC |
853987d | kaizhangNV | 01 May 2024, 17:46:21 UTC | Add ParamDecl as the attribute target (#4067) Currently we only allow variable, struct, and function as the target for the user-defined attribute, this change adds the function parameter to the target as well. | 01 May 2024, 17:46:21 UTC |
ca62ec2 | Sriram Murali | 01 May 2024, 07:06:59 UTC | Adds functionality to dump IR to stdout (#4065) Adds a member dump() to IRInst that can writes the immediate value or IR inst value to stdout to help with debugging | 01 May 2024, 07:06:59 UTC |
2abd5bd | Sai Praveen Bangaru | 01 May 2024, 01:03:21 UTC | Avoid classifying methods with `[numthreads]` as entry points for CUDA-related targets (#4063) | 01 May 2024, 01:03:21 UTC |
52b9123 | Sai Praveen Bangaru | 30 April 2024, 20:05:33 UTC | Added diagnostics & built-in type lowering for `[CUDAKernel]` functions (#4042) * Added diagnostics & built-in type lowering for `[CUDAKernel]` functions This PR adds - Diagnostics for non-void return from a cuda kernel entry point - Diagnostics for using differentiable types in a differentiable cuda kernel entry point - Logic for converting built-in types (float3, float3x3, etc..) to portable struct types and unpacks the parameter back into a built-in type on the CUDA side. This is because built-in types have different implementations in CUDA & CPP targets, which causes signature mis-match when linking. * Fix error codes * Add ability to lower structs and arrays that contain built-in types. + Added tests + Fix issue where the host-side was not marshalling data to lowered types. * Update slang-ir-pytorch-cpp-binding.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com> | 30 April 2024, 20:05:33 UTC |
70111da | Sriram Murali | 30 April 2024, 19:20:16 UTC | Generate vectorized version of byteaddress load/store methods (#4036) Fixes #3533 - Add logic to perform aligned memory operations for loading from and storing to composite resources, like vectors within the ByteAddress legalize pass. - Checks Added a new test for byte address with/without alignment. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 30 April 2024, 19:20:16 UTC |
95ca2aa | kaizhangNV | 30 April 2024, 18:23:11 UTC | Change stdlib to not depend on short-circuit (#4056) Do not use "&&" to implement the intrinsic kIROp_And, instead define a 'and' function in stdlib. So it will be up to us to determine whether we want to use 'short-circuit' behavior in stdlib. | 30 April 2024, 18:23:11 UTC |
492f56e | kaizhangNV | 30 April 2024, 17:47:10 UTC | Add option -disable-short-circuit (#4054) Add option -disable-short-circuit to disable short circuit for logic operators && and ||. Also, disable the short circuit by default in the stdlib. | 30 April 2024, 17:47:10 UTC |
f1221b8 | Yong He | 30 April 2024, 16:57:54 UTC | Metal: Vertex/Fragment builtin and layouts. (#4044) * Metal: Vertex/Fragment builtin and layouts. * Fix. * Fix test. * Emit user semantic on vertex/fragment attributes. | 30 April 2024, 16:57:54 UTC |
019d68f | Jay Kwak | 29 April 2024, 21:14:05 UTC | Replace __target_intrinsics and __specialize_for_target, part 1 (#4050) * Replace __target_intrinsics and __specialize_for_target Partially resolves #3906 Most but not all __target_intrinsics are replaced with __target_switch. All __specialize_for_target are replaced with __target_switch. This change is mostly processed by a temporary c++ program mechanically. Because the change is already too big, the remaining __target_intrinsics will be replaced later in another commit. * Fix indentations * Add diff.meta.slang * Revert the change in __sizeOf<>(). "$G0" doesn't seem to work. It needs to be addressed later. * Revert more functions that use `$G0` keyword | 29 April 2024, 21:14:05 UTC |
1a40819 | kaizhangNV | 29 April 2024, 17:15:11 UTC | Do not mangle the name of identifiers when __extern_cpp is added (#4052) Do not mange the name of identifiers decorated by "__extern_cpp". For a slang files that are included by the library module and entry point module, slang could generated two different mangled names for the same functions, because the function with a struct parameter will make the mangled function name contains the file name. Therefore, we allow using "__extern_cpp" on such struct, such that no file name is associated in the mangled name. | 29 April 2024, 17:15:11 UTC |
30b82ab | ArielG-NV | 29 April 2024, 02:34:02 UTC | Add variable pointers to render-test-vk and a related failing test-case (#4041) * add variable pointers to render-test-vk and failing (but ignored with workarounds) test-case | 29 April 2024, 02:34:02 UTC |
2b87c00 | Sai Praveen Bangaru | 27 April 2024, 06:27:28 UTC | Fix invoke resolution when dealing with overloded type expressions (#4043) | 27 April 2024, 06:27:28 UTC |
e91bd3b | ArielG-NV | 26 April 2024, 05:27:30 UTC | WIP: Force Inline If RefType (#4005) * Force Inline if reftype Fixes #3997. If we are using a refType, we now ForceInline. remarks: 1. Modifications were made in slang-ir-glsl-legalize to change how we translate GlobalParam proxy's into GlobalParam. a. We now handle the senario where a globalParam is used in multiple disjoint blocks (like 2 different functions). * try to figure out why CI fails but local works try to inline DispatchMesh, works locally, may fail on CI(?) * try another fix * add task tests + don't allow semi-early task-shader inline Task shader uses DispatchMesh which is a very big 'hack' where we check for the function name and modify the callees in very large ways. This function does inline, but it cannot inline early due to future mangling that this operation requires todo. This is reflected with the `[noRefInline]` modifier. It is a modifier so users may stop mandatory inlines with `__ref` parameter. | 26 April 2024, 05:27:30 UTC |
bc7231b | Jay Kwak | 25 April 2024, 23:14:08 UTC | Fix unpackUnorm4x8 and unpackSnorm4x8 (#4033) Fixes #4031 Each component of unpackU/Snorm4x8 had to be masked for 8bits. | 25 April 2024, 23:14:08 UTC |
ed06811 | Jay Kwak | 25 April 2024, 16:02:13 UTC | Keep const-ness in generic functions (#4028) * Keep const-ness in generic functions Closes #3834 The issue was that "const" variables inside of generic functions became non-const variables. This issue prevented some of GLSL texture functions from being called inside of generic functions. When `propagateConstExpr()` iterates the global functions, the generic functions had to be handled little differently. This commit allows the iteration to happen for the generic functions. * Adding an explantion of the test as a comment | 25 April 2024, 16:02:13 UTC |
366a947 | ArielG-NV | 25 April 2024, 13:18:32 UTC | Support derivative functions in compute & capabilities adjustments (#4014) * Support derivative functions in compute & capabilities adjustments fixes #4000 PR implements derivative functions in compute shaders properly so we have the functionality for SPIR-V & GLSL. Tests reflect fragment and compute paths. PR also adjusts capabilities to correct wrong SPRI-V target capabilities for when using textures. Remarks: 1. __requireComputeDerivative(); is a intrinsic_op and not modifier since inlining will destroy the modifier. 2. Derivative mode is tied to an entry point decoration `[DerivativeGroupQuad]`/`[DerivativeGroupLinear]` or GLSL syntax ``derivative_group_linearNV`. Default is to set the mode to `[DerivativeGroupQuad]` * remove -emit-spirv-directly * fixes 1. fix minor issue fwidth change where I returned the wrong type 2. fix issue where glslang{glsl->spirv} is wrong, so we don't run that test and just run the glsl test & direct spir-v test for intrinsic-texture.slang * adjust as per review and refine code 1. add test to ensure multi-diverging-in-logic entry points work -- 2 functions which may cause computeDerivatives + 1 that uses, 1 that does not. 2. naming 3. use entry point ref graph for c-like-targets 4. reordered some code to util's and removed `static linline` since that was just for ease of coding on my end (should not have been pushed). * Grammer * split up source file + issolate GLSL emit path change. --------- Co-authored-by: Yong He <yonghe@outlook.com> | 25 April 2024, 13:18:32 UTC |
52dcb5b | Jay Kwak | 25 April 2024, 01:35:46 UTC | Updating CONTRIBUTION guide to use CMake (#4017) Releated to #3703 Removing the build instruction with Premake and replacing it with an instruction with CMake. It is because we are going to move over to CMake anytime soon. Bumping the required CMake version to 3.25.0. When CMakePresets.json has "version:6", it requires CMake version to be 3.25 or above. See the URL below for more information, https://cmake.org/cmake/help/latest/release/3.25.html CMakeLists.txt copies the prebuilt binary files from external/slang-binaries/bin/windows-x64 CMakeLists.txt was copying "slang-llvm.dll" to build/Release/lib directory when it should have been build/Release/bin. It made slang-test to ignore all FILECHECK tests. This is fixed. Co-authored-by: Yong He <yonghe@outlook.com> | 25 April 2024, 01:35:46 UTC |
941961e | Sai Praveen Bangaru | 24 April 2024, 23:50:50 UTC | Prevent pointer validation for zero-size arrays (#4021) | 24 April 2024, 23:50:50 UTC |
d3ed08e | Yong He | 24 April 2024, 23:23:35 UTC | Parameter layout and reflection for Metal bindings. (#4022) | 24 April 2024, 23:23:35 UTC |
fc4c242 | Yong He | 24 April 2024, 22:51:43 UTC | Fix macos CI and clang warnings. (#4019) * Fix macos CI. * Fix. * Fix. * Fix. * Fix clang warnings. * Fix more warnings. | 24 April 2024, 22:51:43 UTC |
211b2ff | Jay Kwak | 24 April 2024, 15:06:50 UTC | Silent compiler warning about missing override keywords (#4018) Adding "override" keywords for member functions whereever they need. The compiler warning was visible on CI build but not visible on local visual studio build. | 24 April 2024, 15:06:50 UTC |
97631e9 | Jay Kwak | 24 April 2024, 14:18:21 UTC | Avoid DXC warnings for missing bitwise op parantheses (#4004) Resolves #3980 Based on the operator precedence, Slang may omits the parentheses if they are not needed. DXC prints warnings for such cases and some applications may treat the warnings as errors. This commit emits parentheses to avoid the DXC warning even when they are not needed. | 24 April 2024, 14:18:21 UTC |
c6b9a91 | kaizhangNV | 24 April 2024, 01:39:15 UTC | Do not diagnose error when a symbols is defined as 'extern' and 'export' (#4010) Fix the issue (#3999). For a function is defined as extern and export at the same time, don't report error, we can use the 'export' function to overload the 'extern' function. | 24 April 2024, 01:39:15 UTC |
f1de181 | Yong He | 23 April 2024, 19:14:21 UTC | Switch to direct-to-spirv backend as default. (#4002) * Switch to direct-to-spirv backend as default. * Fix slang-test. * Fix. * Fix. | 23 April 2024, 19:14:21 UTC |