| Commit message (Collapse) | Author | Age |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a simple interface parameter test
Since there's no documentation, it's nice to have a simple test case in order to
experiment with this feature of the testing framework.
* Add shader entry point attributes to tests
* Fix specialization arguments for tests
- Add some missing arguments
- Rremove one extraneous argument.
* Stop using deprecated compile request in render-test
Use a session object instead of the deprecated compile request object.
This closes issue #4760.
|
| |
|
|
|
| |
Abort precompileForTarget if it's already done.
Fixes #6516
|
| |
|
| |
Bail from test if shader doesn't compile.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new option "SkipDownstreamLinking" will defer final downstream IR
linking to the user application. This option only has an effect if
there are modules that were precompiled to the target IR using
precompileForTarget().
Until now, the default behavior for SPIR-V was to use deferred linking, and
the default behavior for DXIL was to use immediate/internal linking in Slang.
This change only affects the SPIR-V behavior such that both deferred and
non-deferred linking is supported based on the new option.
To support the non-deferred option, Slang will internally call into
SPIRV-Tools-link to reconstitute a complete SPIR-V shader program when
necessary (due to modules having been precompiled to target IR).
Otherwise, if SkipDownstreamLinking is enabled, the shader returned by
e.g. getTargetCode() or getEntryPointCode() may have import linkage to
the SPIR-V embedded in the constituent modules.
Closes #4994
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add cuda codegen bug repro
This just compiles tests/compute/simlpe.slang for PTX with the new compilation API, in
order to reproduce a code generation bug.
* Detect entrypoint more robustly when applying ConstRef hack during lowring
For shaders like tests/compute/simple.slang, which have a 'numthreads' attribute but no
'shader' attribute, the old compile request API would add an EntryPointAttribute to the
AST node of the entry point. However, the new API doesn't, and so a certain ConstRef hack
doesn't get applied when using the new API, leading to subsequent code generation issues.
This patch also checks for a 'numthreads' attribute when deciding whether to apply the
ConstRef hack.
This closes issue #6507 and helps to resolve issue #4760.
* Add expected failure list for GitHub runners
Our GitHub runners don't have the CUDA toolkits installed, so they can't run all tests.
|
| |
|
| |
This closes issue #4771.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix build error when SLANG_ENABLE_TESTS is set to OFF
When SLANG_ENABLE_TESTS is disabled but SLANG_ENABLE_GFX is enabled,
cmake was failing. It turned out that gfx build target was trying to
copy some of files to the directory where slang-test uses. When
SLANG_ENABLE_TESTS is disabled, the directory information became
unavailable, because slang-test target became unavailable.
This commit makes the copying behavior conditional on SLANG_ENABLE_TESTS
in the gfx build target.
* format code (#42)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Resolve 'extern' types during type layout generation if possible
Closes https://github.com/shader-slang/slang/issues/5994
Closes https://github.com/shader-slang/slang/issues/6437
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove tests/compute/dump-repro
The -load-repro option is no longer maintained.
This helps to address issue #4760.
* Rename ShaderCompilerUtil::Output::session to globalSession
* Remove the load-repro codepath
* Lifetime bugfix
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #6390
This commit removes the deprecated -adapter command-line option from
slang-test.
This change aligns with commit 015bde8d5a46f32979c00dbb1feb4b3d80729c44,
which previously removed the adapter option from render-test and implemented
the more AdapterLUID mechanism.
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove unused resource
* define buffer data
* add vs2022 build presets
* update slang-rhi API usage
* update slang-rhi
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow `.member` syntax on vector and scalars.
* Fix.
* fix.
* Fix.
* update comment.
* Fix tests.
* Fix warning.
* Add more tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix precompiledTargetModule tests
Add SPIRV-Tool linker support to gfx unit tests
and use the linker in precompileModule tests
that use precompiled modules to reconstitute
SPIRV shaders that were modularly compiled.
Fix a Slang reference count bug in the
precompile service.
* Use sm_6_6
New DXC requires higher version
for linkability.
* Rename helper function, pass by reference
* Link through slang-glslang
* Add missing files
* Fix metal
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
| |
Close issue: #6386.
- Implement uploadTextureData in metal
- Fix a bug in 'copyTextureToBuffer' in metal
The last parameter for Metal::copyFromTexture is the
'destinationBytesPerImage', but previous implementation
fill in the destination size which is wrong in 3-D texture.
|
| |
|
|
|
|
|
| |
Improve performance when compiling small shaders.
Avoid copying witness table entries that are not getting used during linking.
Avoid copying auto-diff related decorations and derivative functions during linking, if the user modules doesn't use autodiff.
Cache operator overload resolution results on global session, so each new Session doesn't need to repetitively run through overload resolution from scratch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Plumb raytracing shaders through render-test-main
RenderTestApp is missing handling for RayTracing in a few places.
* fixup formatting
* enable optix test category by default
* Revert "enable optix test category by default"
This reverts commit d142068058a827843fd7ebcf89a6ec252fd3c69a.
---------
Co-authored-by: cheneym2 <acheney@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Partially fix #6378
* Fix invalid access mode for texture_buffer
* Fix texture view create issue in metal
In newTextureView, levelRange should represent the mipmap level range,
while sliceRange should represent the texture layer range for texture
array. But the implement inverse those two wrongly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When -show-adapter-info is provided to slang-test, there is a subsequent pass over all available APIs to ask render-api to show which adapter will be used.
> .\slang-test.exe -show-adapter-info
Supported backends: fxc dxc glslang spirv-dis clang visualstudio genericcpp nvrtc llvm spirv-opt tint
Check vk,vulkan: Supported
Check dx12,d3d12: Supported
Check dx11,d3d11: Supported
Check cuda: Supported
Check wgpu,webgpu: Supported
Adapter Information for Available APIs:
vk,vulkan:
Using graphics adapter: NVIDIA RTX A3000 Laptop GPU
dx12,d3d12:
Using graphics adapter: NVIDIA RTX A3000 Laptop GPU
dx11,d3d11:
Using graphics adapter: Intel(R) UHD Graphics
cpu:
cuda:
wgpu,webgpu:
Using graphics adapter: default
passed test: 'tests/autodiff/arithmetic-jvp.slang (dx11)'
...
closes #5600
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Clean up unused code
* Clean up support interface
* Rename the compile output requests to mark them DEPRECATED
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix metal issue
- implement waitForFences for metal backend
- fix a bug that it misses clear the entryPoints when initializing
RootShaderObject
* format
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Neaten metal parameter block checking
* Disallow only resources in constant buffers in parameterblocks on metal
closes https://github.com/shader-slang/slang/issues/6200
* add unit test for metal parameterblock cbuffer
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix 6317.
* Fixes #6316.
* Fix cmake preset.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
| |
This helps to address #4760.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow LHS of `where` to be any type.
* Register free-form extensions when loading precompiled module.
* Fix test.
* Fix.
* Fix `as<IRType>`.
* try fix precompiled module test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Publicly link core module sources
Closes https://github.com/shader-slang/slang/issues/6037
* format
* format
* remove unnecessary conditional
* comments
* neaten
* Only build embedded core modules when necessary
* Make dependencies on core module source more precise
* more precice dependencies on core module source
* Neaten
|
| |
|
| |
This closes #6221.
|
| |
|
|
|
|
| |
This commit enables "D3D12-experimenta-feature" in render-test.
This is required to use CoopVec feature with dxcompiler.dll.
But it is enabled only when "-dx12-experimental" is used, because it appears that DX12 becomes unstable when the experimental feature is enabled, which causes bunch of tests randomly failing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* SP004: implement initialize list translation to ctor
- We synthesize a member-wise constructor for each struct follow
the rules described in SP004.
- Add logic to translate the initialize list to constructor invoke
- Add cuda-host decoration for the synthesized constructor
- Remove the default constructor when we have a valid member init constructor
- Disable -zero-initialize option, will re-implement it in followup (#6109).
- Fix the overload lookup issue
When creating invoke expression for ctor, we need to call
ResolveInvoke() to find us the best candidates, however
the existing lookup logic could find us the base constructor
for child struct, we should eliminate this case by providing
the LookupOptions::IgnoreInheritance to lookup, this requires
us to create a subcontext on SemanticsVisitor to indicate that
we only want to use this option on looking the constructor.
- Do not implicit initialize a struct that doesn't have explicit default
constructor.
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update Slang-RHI and enable any debug layers up-front
As [1] shows, creating a D3D12 device and then enabling debug layers causes future device
creation to fail.
That means enabling debug layers is a process-wide decision that should be done at
startup, and not just before creating an individual device.
Previously, Slang-RHI enabled debug layers as part of device creation.
The new Slang-RHI revision doesn't do that anymore, but instead allows the user to enable
debug layers earlier, with a separate API.
This change calls the mentioned API before creating any device.
This closes #6172.
* Compile fixes needed after updating slang-rhi
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
| |
* Support cooperative vector including Vulkan-Header
Adding a Slang support for cooperative vector with vulkan-header update.
|
| |
|
|
|
|
|
| |
* Support cooperative vector without Vulkan-header update
Adding a Slang support for cooperative vector.
But this commit doesn't have Vulkan-header update.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix geometry shader related modifier lowering.
* Cleanup.
* Delete obselete test.
* Enable geometryShader test on windows only.
* Fix test.
|
| |
|
| |
Co-authored-by: Anders Leino <aleino@nvidia.com>
|
| |
|
|
|
|
|
| |
* Add SLANG_ENABLE_RELEASE_LTO cmake option
* Fix cmake static build
* Disable install SlangTargets to avoid static build failing
|
| |
|
|
|
|
|
|
|
|
|
| |
* Cache and reuse glsl module.
* Fix.
* Implement record/replay for the new api.
* Fix record replay.
* Fix test.
|
| | |
|
| |
|
|
|
| |
* Add groupshared atomic array test.
* Fix test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Avoid using the backend validation when using test server
Currently with a debug build, the backend validation such
as Vulkan-Validation-Layer or DXC validation is enabled all the time.
It means there is a higher chance that we see warning messages while
running slang-test with a debug build.
However, those warning messages incorrectly treated as the testing
result when using test-server. This is mainly because of the fact that
the Slang implemention for the RPC commucation expects only one time
output result. As soon as any warning is printed, the testing process is
incorrectly considered as completed even though it might be still in the
middle of initializing the device.
This commit disables the backend validation when using the test-server.
* format code (#31)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
| |
* Create DirectDeclRef when creating Decl to prevent invalid dedup.
* Fix test.
* fix
* update slang-rhi
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for Vulkan (#5929)
* Support gfx ComputeCommandEncoder::dispatchComputeIndirect for Vulkan
* Support count buffer for Vulkan in gfx RenderCommandEncoder::drawIndirect and RenderCommandEncoder::drawIndexedIndirect
* Fix an unintended change
* Fix format issue
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| | |
|