| Age | Commit message (Collapse) | Author |
|
|
|
* Fix documentation on DescriptorHandle.
* Fix.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Allow using specialization constants in numthreads attribute
* Add support for GLSL local_size_x_id syntax
* Fix overeager specialization constant parsing
* Add diagnostics for specialization constant numthreads
* Remove unused variable
* Fix local_size_x_id not finding existing specialization constant
* Allow materializeGetWorkGroupSize to reference specialization constants
* Use SpvOpExecutionModeId for modes that require it
* Cleanup specialization constant numthreads code
* Add tests for specialization constant work group sizes
* Fix implicit Slang::Int -> int32_t cast
* Fix querying thread group size in reflection API
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
test (#6067)
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* update slang-rhi
* pass --dopt=on to nvrtc when enabling debug information
* fix leaks in slang-rhi
* update slang-rhi
* only use --dopt when available
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix inaccurate documentation in member function mutability.
* Change throw to result in for specificity.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix simplify if-else
The if-else optimization observes that at if at least one
true/false block is merely an unconditional jump to the
after block, that the whole if-else can be replaced with
a jump to the after block. But it's important to copy
the phi arguments from the aforementioned unconditional
jump, rather than what is present in the 'true' block,
since the 'true' block might actually just be the after
block itself.
Below, the ifElse() would be replaced with an unconditional
jump to block %39, but with the `phi` arguments copied from
the branch to %29, which is an unrelated block.
ifElse(%38, %39, %40, %39)
block %40:
unconditionalBranch(%39)
block %39:
unconditionalBranch(%29, 0 : Float)
block %29(
[nameHint("ret")]
param %ret : Float):
Fixes issue #5972
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* add support for finding OptiX headers
* add documentation
* fix linux path
|
|
|
|
|
|
Fixes #6020
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* WGSL: Fixes for signed shift amounts
- Handle the case of vector shift amounts
- Closes #5985
- Move handling of scalar case from emit to legalization
- Add tests for bitshifts.
* Move the binary operator legalization function to a common place
* Metal: Legalize binary operations
Closes #6029.
* Fix Metal filecheck test
The int shift amounts are now converted to unsigned.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
There are a few tests that are currently passing but could fail when
conditions change little bit.
When slang-test runs with `test-server`, the spirv validation fails and
the test gets reported as failed even though they are actually passing.
To avoid the potential problem, this commit adds an empty entry point.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Initial implementation of `ResourcePtr<T>`.
* Update docs
* Fix build error.
* Add more discussion.
* Update documentation.
* Update TOC.
* Fix.
* Fix.
* Add test case for custom `getResourceFromBindlessHandle`.
* Add namehint to generated descriptor heap param.
* Fix.
* Fix.
* format code
* Rename to `DescriptorHandle`, and add `T.Handle` alias.
* Fix compiler error.
* Fix.
* Fix build.
* Renames.
* Fix documentation.
* Documentation fix.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
This closes #6005.
|
|
* add CalculateLevelOfDetail* intrinsics for comparison samplers
* fix dx12 test
* fix metallib test
* fix merge conflict
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
In order to unblock experiments with SPIRV work-graphs, Slang
needs to support the storage class, `NodePayloadAMDX`.
Note that this commit is only to support a storage class,
`NodePayloadAMDX`. There are many parts required for work-graphs
hasn't been implemented yet.
The implementation of `DispatchNodeInputRecord` is not required, but it
is implemented mostly for a testing purpose.
Closes #6049
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Add files via upload
Adding first draft at proposal to disambiguate the use of uniform with ray tracing entry points.
* Update and rename 000-shader-record.md to 017-shader-record.md
|
|
* Fix implicit string conversion breaking NativeStrings
* Allow string literals to coerce to either string type
* Add test for CPU string passing
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
The version 3 of actions/upload-artifact will be deprecated soon.
https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
This commit upgrades to v4.
There is a document describing how to migrate/upgrade:
https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md
The breaking change on v4 is that the uploaded files are immutable and
we can no longer append files with the same name. We don't seem to be
doing it so it should be fine for us.
Closes #6050
|
|
differentiable functions (#5866)
* Overhauled the auto-diff system for dynamic dispatch
* More fixes
* remove intermediate dumps
* Update slang-ast-type.h
* More fixes + add a workaround for existential no-diff
* Update reverse-control-flow-3.slang
* remove dumps
* remove more dumps
* Delete working-reverse-control-flow-3.hlsl
* Cleanup comments + unused variables
* More comment cleanup
* Add support for lowering `DiffPairType(TypePack)` & `MakePair(MakeValuePack, MakeValuePack)`
* Fix array of issues in Falcor tests.
* Update slang-ir-autodiff-pairs.cpp
* More fixes for Falcor image tests
* Small fixups.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Add parentheses to make precedence explicit
Add parentheses for a few cases that Dawn/Tint (WGSL compiler) complains about.
Closes #6005.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* add SampleCmpLevel intrinsics
* update tests
* fix typo
* fix broken glsl test
* refactor SampleCmpLevelZero
* fix metallib test
* fix broken test on dx12
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
I hit issue #5305 again after re-generating the build directory, building and then running
slang-test.
In other words, D3D12 and Slang-RHI/WebGPU/D3D12 failed to create a device due to the
runtime being incosistent. Bilding copy-prebuilt-binaries fixed it, and so it's best to
make this step a dependency of slang-test.
|
|
* examples: Log stack trace on exceptions
For now, this is only implemented on Windows.
This helps to address #5520.
* examples: Print log file if there is any
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Add executable test on matrix-typed vertex input.
* Fix emit logic of matrix layout qualifier.
* Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.
|
|
* Check whether array element is fully specialized
close #5776
When we start specialize a "specialize" IR, we should
make sure all the elements are fully specialized, but
we miss checking the elements of an array. This change
will check the it.
* add test
* add all wrapper types into the check
* add utility function to check if the type is wrapper type
---------
Co-authored-by: zhangkai <zhangkai@zhangkais-MacBook-Pro.local>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
This closes #5656.
|
|
* examples: Make hello-world example exit gracefully if VK cannot be initialized
- Check if VK API function pointers are valid before using them
- Return 0 and exit if VK initialization fails
- Enable hello-world example
* examples: Fixes for ray-tracing examples
- Assert that accelleration structure buffer is not nullptr
- Check if buffer creation succeeded before proceeding
- This makes initialization not hang, but it still fails.
Therefore, the test expectations are just updated to point to another issue.
- Enable ray-tracing tests on Windows
|
|
* Use disassemble API from SPIRV-Tools
This commit uses C API version of SPIRV disassemble function rather than
calling spirv-dis.exe.
This allows us to use a correct version of SPIRV disassble function that
Slangc.exe is using.
The implementation is mostly copied from external/spirv-tools/tools/dis/dis.cpp, which is a source file for building spirv-dis.exe.
This commit also includes a fix for a bug in RPC communication to `test-server`.
When an RPC connection to `test-server.exe` is reused and the second
test abruptly fails due to a compile error or SPIRV validation error,
the output from the first test run was incorrectly reused as the output
for the second test.
This commit resets the RPC result before waiting for the response so
that even when the RPC connection is erratically disconnected, the
result from the previous run will not be reused incorrectly.
Some of the tests appear to be relying on this type of behavior. By
using an option, `-skip-spirv-validation`, the RPC connection will
continue without an interruption.
|
|
* Properly set D3D12SDKPath
Closes https://github.com/shader-slang/slang/issues/5992
This commit have an effect on slang-test.exe and test-server.exe.
When we run slang-test.exe, it uses D3D12Core.DLL located at
`build/{Release,Debug}/bin/D3D12`, which is `D3D12` from where the
executable file is located at.
This has been working fine but we found a case where it doesn't work
properly. This commit sets D3D12SDKPath value explicitly to avoid
potential problems.
|
|
* Add `Bindless<T>` proposal.
* Clarify on what happesn if native bindless T has different size/alignment.
* Add discussion on alternatives.
* Update reviewer.
|
|
|
|
|
|
library. (#5998)
A recent build breakage for slang-wasm.[js|wasm] was not noticed by CI since it built the
slang library target instead of the slang-wasm.js "executable" target.
(We added a that used objcopy to split debug info from executables. objcopy does not
report errors when it finds object files with unexpected format inside static libraries,
but it *does* report errors when it's run on an exceutable of unexpected format, such as
in the case of slang-wasm.js.)
This closes #5959.
|
|
|
|
* Create DirectDeclRef when creating Decl to prevent invalid dedup.
* Fix test.
* fix
* update slang-rhi
|
|
|
|
* Correct IR generation for no-diff pointer type
Close #5805
There is an issue on checking whether a pointer type parameter
is no_diff, we should first check whether this parameter is
an Attribute type first, then check the data type.
In the back-propagate pass, for the pointer type parameter, we should
load this parameter to a temp variable, then pass it to the primal
function call. Otherwise, the temp variable will no be initialized,
which will cause the following calculation wrong.
|
|
|
|
An AND operator was used where an OR should have been used.
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
|
|
|
|
|