| Age | Commit message (Collapse) | Author |
|
(#5415)
This commit changes the word "stdlib" or "standard library" to "core module" in the source code.
|
|
auto-diff results (#5394)
* Various AD enhancements
* Fix issue with pt-loop test
* Update pt-loop.slang
* More fixes for perf. Final minimal context test now passes.
* Fix issue with loop-elimination pass not running after dce
* Try fix wgpu test by removing select operator
* Disable wgpu
* Delete out.wgsl
* Remove comments
* Update slang-ir-util.cpp
* Fix header relative paths for slang-embed
* Disbale wgpu for a few other tests
* Better way of determining which params to ignore for side-effects
* Update slang-ir-dce.cpp
* Fix issue with circular reference from previous AD pass being left behind for the next AD pass
* Update slang-ir-dce.cpp
|
|
|
|
|
|
This is a breaking change in a way that the Slang API function names are changed. All of them are commented as "experimental" and we wouldn't provide a back-ward compatibility for them.
Following functions are renamed:
compileStdLib() -> compileCoreModule()
loadStdLib() -> loadCoreModule()
saveStdLib() -> saveCoreModule()
slang_createGlobalSessionWithoutStdLib() -> slang_createGlobalSessionWithoutCoreModule()
slang_getEmbeddedStdLib() -> slang_getEmbeddedCoreModule()
hasDeferredStdLib() -> hasDeferredCoreModule()
Following command-line arguments are renamed:
"-load-stdlib" -> "-load-core-module"
"-save-stdlib" -> "-save-core-module"
"-save-stdlib-bin-source" -> "-save-core-module-bin-source"
"-compile-stdlib" -> "-compile-core-module"
|
|
* Use DebugDeclare instead of DebugValue.
* Avoid generating illegal SPIRV.
* Improve DebugLine output.
* Fix.
* Fix.
* Misc improvements.
|
|
|
|
|
|
|
|
* Remove use of Variable Pointer capability.
|
|
* Cleanup definition of `printf`.
* Fix.
* Fix spirv generation.
* Fix.
* enhance test.
|
|
* Cleanup atomic intrinsics.
* Fix.
* Fix glsl.
* Remove hacky intrinsic expansion logic for glsl image atomics.
* Fix all tests.
* Fix.
* Add `InterlockedAddF16Emulated`.
* Fix glsl intrinsic.
* Fix.
|
|
* Fix spirv debug info for pointer types.
* fix comment.
|
|
Add fcpw library to test suite.
|
|
|
|
|
|
* Support constant folding for static array access.
* Fix test.
|
|
|
|
When precompiling modules defined
with glsl, it's necessary to link in the
glsl definition module.
Reuse the public fillRequirements declaration
|
|
|
|
* Fix spirv lowering logic around pointer to unsized array.
* Fix.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Overhaul docgen tool and setup CI to generate stdlib reference.
* Fix build error.
* Write parsed doc for all decls.
* fix.
* fix callout.
* Fix.
* Fix comment.
* Fix.
* Delete obsolete doc tests.
* Fix.
* Categorize functions and types.
* Fix CI.
* Update comments.
|
|
initialization (#5023)
* Look through attributes and rates when determining by reference initialization
Closes #5022
* Make type of unwrapAttributedType more specific
* loosen type of unwrapAttributedType
* Discard changes to source/slang/slang-emit-spirv.cpp
* Discard changes to source/slang/slang-ir-check-differentiability.cpp
* Discard changes to source/slang/slang-ir.cpp
* Discard changes to source/slang/slang-ir.h
* Update slang-ir-use-uninitialized-values.cpp
* Remove redundant cast
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
declarations (#5236)
Closes issue #5229.
|
|
* Use the assembly description as target when disassembling
I believe this is a bugfix.
It seems to have worked before because up until the WGSL case, the disassembler has been
the same executable as the one producing the binary to be disassembled.
* Add Tint as a downstream compiler
This closes issue #5104.
* Add downstream compiler for Tint.
* Tint is wrapped in a shared library, 'slang-tint' available from [1].
* The header file for slang-tint.dll is added in external/slang-tint-headers.
* Add some boilerplate for WGSL targets.
* Add an entry point test for WGSL.
[1] https://github.com/shader-slang/dawn/releases/tag/slang-tint-0
* Add WGSL_SPIRV as supported target for Glslang
* Add WebGPU support to slang-test
This helps to address issue #5051.
* Disable lots of crashing compute tests for 'wgpu'
This closes issue #5051.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Implement separate downstream library interface
Create a new com interface to house the methods for
precompiling slang modules to target code.
Add methods to count dependent modules and scrape
them for downstream target binaries such that the
downstream target binaries are linkabe outside
of slang, e.g. via spirv-link or dxc.
Fixes #5147
* Rename to _Experimental
Clearly identify this as an interface subject to change.
|
|
* Initial work to support custom derivatives for member methods of differentiable types
* Support custom derivatives of member functions of differentiable types
- Also adds support for declaring custom derivatives via extensions.
* Fix
* move defs
* Update slang-check-decl.cpp
* Create diff-member-func-custom-derivative.slang.expected.txt
* Update slang-check-decl.cpp
* Fix for static custom derivatives
* Fix diagnostics for [PreferRecompute]
* Add backward custom derivative tests
|
|
(#5200)
* Fix crash when compiling associatedtypes with generic interface constraints.
* delete hlsl.meta.slang.temp.h.
* Fix.
|
|
* Fix diagnostics for [PreferRecompute]
* Update dont-warn-on-simple-prefer-recompute.slang
* Update slang-ir-autodiff.cpp
* Update dont-warn-on-simple-prefer-recompute.slang
* Update warn-on-prefer-recompute-side-effects.slang
|
|
* Add COM API for querying metadata.
* Fix tests.
* fix test.
|
|
|
|
|
|
|
|
* Implement texture_storage_Xd in WGSL
This commit implements `texture_storage_Xd` in WGSL, which is similar
to RWTextureXD in HLSL.
It is intresting that `texture_storage_Xd` doesn't take the shader
type as its input argument at all.
Instead, it takes "texel format" enum value as its first template
parameter, which can be found here:
https://www.w3.org/TR/WGSL/#storage-texel-formats
As an example, `texture_storage_2d<rg32uint, read_write>` expects
vec4<u32> as a value type for `Load` and `Store`, where Z-component
will be ignored and treated as zero and W-component will be treated
always as 1. The type `u32` is inferred from the enum value `rg32uint`.
Note that the number of component is always fixed to 4 regardless how
many components are actually stored.
|
|
|
|
* WGSL texture support for depth and multisampled
This commit fixes a few issues with WGSL texture intrinsics.
- static_assert-s are corrected.
- Gather functions work properly with depth textures
- Load functions work properly with depth textures and multisampled
textures
|
|
|
|
This PR implements the texture gather functions for WGSL.
The pattern was very similar to how Metal was implemented.
Before copy and paste from the Metal implementation, I had to
clean up the Metal implementation to make it more readable
and maintainable.
Gather functions are available only for 2D and 3D textures.
Their `array` and `depth` variants may or may not be supported depending on the target.
`static_assert` ensures that Gather functions are available only for 2D and 3D textures.
Removed incorrect use of "$p" argument for targeting GLSL.
|
|
* Implemented Combined-texture for WGSL
* Remove unnecessary comment
* Limit to std430 layout
* Fix compiler warning for unused variable
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
This commit implements all of the texture intrinsics for WGSL except "Gather" and sampler-less.
They will be implemented in a separate PR.
A few things to note:
- texture sampling functions are available only for the fragment shader stage; not for compute
- WGSL doesn't have any functions similar to CalculateLevelOfDetail or CalculateLevelOfDetailUnclamped.
- WGSL doesn't have a function overlaoding for textureSample with "clamp" or "status" arguments.
- WGSL doesn't support Load operation with offset for texture_multisampled_XX and texture_storage_XX.
- WGSL supports only four types of depth textures: 2D, 2D_array, cube and cube_array.
- WGSL doesn't support "offset" variants for cube and cube_array.
|
|
* Initial Atomic<T> type implementation.
* Update design doc.
* Fix.
* Add test.
* Fixes and add tests.
* Fix WGSL.
* Fix glsl.
* Fix metal.
* experiemnt with github metal.
* experiment github metal 2
* github metal experiment 3
* experiment with github metal 4.
* experiment with metal 5.
* experiment 7.
* metal experiment 8.
* Fix metal tests.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Add diagnostic to verify the left hand side of a generic constraint.
* Fix comment.
|
|
* Synthesize conformance for generic requirements.
* Fix.
* Fix build error.
* address code review.
|
|
* Update spirv-headers and spirv-tools versions
* Fix compute-derivative regressions with upgraded spirv headers
Extension was promoted from NV to KHR while retaining same enums.
Fixes #5106
* Prevent DCE on ray trace position fetch
Adds dummy usage to the intersection positions fetched
from HitTriangleVertexPositions to prevent DCE from
removing their usage.
Fixes #5105
* Update spirv-tools-generated
* More DerivativeGroup*KHR test fixes
Add fixes for a missing test intrinsic-derivative-function-in-compute.slang
Use the {{NV|KHR}} syntax to tolerate either enum.
Fixes #5106
* Squash tabs in closesthit test
* HACK test CI
* Avoid multiple IncomingRayPayloadKHR storage params
* Revert "HACK test CI"
This reverts commit c2556ea2baef0bd48e4c86f90cf17dfab80015c1.
* Avoid multiple IncomingRayPayloadKHR storage params in anyhit
|
|
* initial diff-ref-type interface
* Initial support for `IDifferentiablePtrType`
* Fix unused vars
* More tests + fix switch case fallthrough.
* Update slang-ir-autodiff.cpp
* Update diff-ptr-type-loop.slang
* Add optimization to allow more complex pair types
* Update slang-ir-autodiff-primal-hoist.cpp
* Update diff-ptr-type-loop.slang
* Update slang-ir-autodiff-primal-hoist.cpp
* More fixes to address reviews
* Update slang-check-expr.cpp
* Optimizations + rename `differentiableRefInterfaceType` -> `differentiablePtrInterfaceType`
* Move pair logic to ir-builder, unify the type dictionaries.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Transferring source locations when creating phi instructions
* Tracking for simple variables
* Deriving source locations for loop counters
* Printing checkpoint structure breakdown
* More readable output format
* Special behavior for loop counters
* Writing report to file
* Add slangc option to enable checkpoint reports
* Display types of checkpointed fields
* Message in case there are no checkpointing contexts
* Catch source locations for function calls
* Source cleanup
* Fix compilation warnings
* Remove stray dump()
* Provide the report through diagnostic notes
* Add missing path for sourceLoc during unzip pass
* Add tests for reporting intermediates
* Include more transfer cases for source locations
* Fix ordering in address elimination
* Fill in more holes with source location transfer
* Remove debugging line
* Reverting changes to diagnostic sink
* Simplify address elimination using source location RAII contexts
* Eliminating manual source loc transfers in forward transcription
* Fix local var adaptation to use RAII location setter
* Simplify primal hoisting logic for source location transfer
* Simplify unzipping with RAII location scopes
* Simplify transpose logic
* Cleaning up for rev.cpp
* Reverting spacing changes
* Fix mistake with source loc RAII instantiation
* Fix formatting issues
|
|
* Lower the priority of looking up the rank of scope
In the previous change of #5060, we propose a way to resolve
the ambiguous call when considering the scope of a function.
But this rule should be considered as a low priority than "specialized
candidate", aka. we should consider more "specialized candiate" first.
* Count distance between reference site to declaration site
Compare the candidate by calculating distance
from reference site to declaration site via nearest common prefix
in the scope tree.
This will involve finding the common parent node of two child nodes
and how sum the distance from the common parent to the two child nodes.
* Change the priority higher than 'getOverloadRank'
* Don't evaluate the scope rank algorithm on generic
If the candidate is generic function, the function parameters
won't be checked before 'CompareOverloadCandidates', so it will
results in that the candidates this function could be invalid.
We should not evaluate the distance algorithm in this case, instead
we will evaluate later when the candidate is in flavor of Func or Expr
since then all the type checks for the function will be done.
|
|
* Add `IRWArray` interface, and make StructuredBuffer conform to them.
* Update user guide.
* Fix.
* Fixes.
|
|
* Implement math intrinsics for WGSL
This commit implements math related intrinsics and a few others for
WGSL.
The implementation is based on the following doc,
https://www.w3.org/TR/WGSL
slang-test was looking for the downstream compiler for WGSL even though
it is not used.
This commit adds a minimal change to avoid the crash.
|