| Age | Commit message (Collapse) | Author |
|
* Add Nix flake for direnv
* Use Sai's suggestion for the `description`
* Make `.envrc` optional
* Move Nix docs to their own section
* Tweak wording
* Tweak wording more
* Add `nixfmt`
---------
Co-authored-by: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Add -dump-module command to slangc
The new -dump-module command to slangc will load and disassemble a slang module, similar to what would be seen by the -dump-ir command, except that -dump-ir tells slangc to print IR as it performs some compilation command. That is, -dump-ir requires
some larger compilation task.
-dump-module on the otherhand requires no additional goal and will simply load a module and print its IR to stdout independently from other compilation steps.
Its intended purpose is to inspect .slang-module files on disk.
It can also be used on .slang files which will be parsed and lowered
if slang does not find an associated ".slang-module" version of the
module on disk.
The compilation API is extended with a new IModule::disassemble()
method which retrieves the string representation of the dumped IR.
Closes #6599
* format code
* Use FileStream not FILE
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* image format json reflection
* format code
* use direct include
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
extension (#6641)
* Output SPV_KHR_compute_shader_derivatives instead of the NV extension
* add alias for nv extension
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Fix reinterpret and bitcast.
* Fix warning.
* Fix.
* Fix.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Implement floating-point pack/unpack intrinsics
* remove unused functions and update caps in glsl meta file
* rename pack capability
|
|
* Fix MSVC warning D9025 when building external dependencies.
* revert unrelated change.
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
|
|
|
|
* Fix crash when swizzling non-differentiable types
* Update slang-ir-autodiff-fwd.cpp
|
|
- Add the diagnostic messages, and code to emit them
- Add some tests
This helps to address issue #6183.
|
|
This commit adds a help screen to slang-test to improve usability;
and update README.md with clearer instructions.
The help screen is displayed when:
- User explicitly requests help with -h or --help flags
- An unknown option is provided
- A required argument for an option is missing
The help screen provides comprehensive documentation of all available options,
organized into sections:
- Basic options (e.g. bindir, test-dir)
- Output modes (e.g. appveyor, travis, teamcity)
- Test prefix usage explanation
Fixes: #6560
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Current releases are removing "v" from "vulkan-sdk-1.4.309.0" when they were supposed to remove it from something like "v1.2.4"
https://github.com/shader-slang/slang/releases/tag/vulkan-sdk-1.4.309.0
Fixed it so it only removes "v", if next character is a number
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix lowering of associated types in generic interfaces.
* Update diff-assoctype-generic-interface.slang
* Fix-up lowering of differentiable witnesses for implicit ops
* Update slang-ir-autodiff-transcriber-base.cpp
* Fix issue with differentiating type-packs
|
|
* Implement structured buffer GetDimensions for WGSL
* byte address buffer fix
* enable wgsl test and minor fixups
* maybe fix get equivalent structured buffer
* remove unnecessary include
* clean up some code in meta file
|
|
* Fix: Respect user-defined output directory settings for libraries
Modified SlangTarget.cmake to properly respect CMAKE_LIBRARY_OUTPUT_DIRECTORY, CMAKE_RUNTIME_OUTPUT_DIRECTORY and CMAKE_ARCHIVE_OUTPUT_DIRECTORY variables when they are explicitly set by the user.
This ensures libraries and executables are placed in the directories specified by the user, including handling Multi-Config generators like Visual Studio, Xcode, and Ninja Multi-Config.
Fixes #5896: Shared library build output location ignores CMAKE setting
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
dependency (#6594)
* Simplify text writing for core module headers
* Use an explicit dependency for generated headers instead of source file dependency
From the CMake Docs
> Do not list the output in more than one independent target that may build in parallel or the instances of the rule may conflict. Instead, use the add_custom_target() command to drive the command and make the other targets depend on that one. See the Example: Generating Files for Multiple Targets below.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
No functional change as overallocating was ok, but this was wrong
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* initial wip
* more wip
* add test
* add unexpected for invalid target
* fixups and improve error message
* fixups and improve error message
* remove incorrect comment
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* format code
* test for link type layout caching
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
closes https://github.com/shader-slang/slang/issues/6556
|
|
* add SLANG_USER_CONFIG
* format code
---------
Co-authored-by: Simon Kallweit <skallweit@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Simon Kallweit <64953474+skallweitNV@users.noreply.github.com>
|
|
* 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.
|
|
In the legacy compile request based API, the referenced modules are added to the request's
linkage libraries as part of compiler option parsing.
In the non-legacy compilation API, the argument parsing creates a temprary compile request
and so those libraries only survive as options.
This change will look for such options when creating an ISession object, and again add the
referenced modules to the libraries of the new linkage that's contained in the ISession
object.
This is done in two steps:
1. Factor out a helper to create a referenced module artifact in the same way as it's done
during legacy option parsing.
2. Use the helper function to create artifacts to add to the linkage libararies, when the
session is created.
This helps to address issue #4760, because it enables passing in downstream modules via
options, as is required for the following tests:
tests/library/library-test.slang.2 (dx12)
tests/library/export-test.slang.2 (dx12)
|
|
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
|
|
Abort precompileForTarget if it's already done.
Fixes #6516
|
|
* IR: Add SPIR-V disassembly for embedded downstream IR dumps
When dumping IR that contains embedded downstream SPIR-V code (via
EmbeddedDownstreamIR instructions), display the disassembled SPIR-V
instead of just showing "<binary blob>".
This CL also does:
- Adds a new interface for disassembly and get result.
- Modify export-library-generics.slang test test to check for the
disassembled SPIR-V
Fixes #6513
* Add module-dual-target-verify test
Fixes #6517
Adds a new test to verify that dxil and spirv targets are stored
separately in the precompiled blob.
* Fix review comments from cheneym2
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
Bail from test if shader doesn't compile.
|
|
Precompiled SPIR-V bits can independently resolve to different
versions of SPIR-V.
To avoid a linker error about mismatched versions, use a linker
feature to automatically use the highest version listed in
the modules.
Fixes #6548
|
|
* Add module reference options to options list when parsing them
Previously, the module was just added to the compile request directly.
This is a problem because the non-deprecated command line option parsing interface
IGlobalSession::parseCommandLineArguments just creates a temporary compile request.
Therefore these options are currently not detected by the API.
This helps to address issue #4760 since it will need to access these modules in order to
supply all of the required code.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
profile (#6538)
If the profile/capability in options set, but set to unknown, then don't count the
setting as requesting a particular profile/capability.
This helps in addressing issue #4760 because the new session-based compilation API always
adds a profile setting via Linkage::addTarget, even if the profile is unknown.
That caused lots of tests to fail due to unexpected output:
"warning 41012: entry point 'computeMain' uses additional capabilities that are not part of the specified profile..."
The old compilation request -based API did not add profile/capabiltiy to the options, and
so did not generate this warning.
|
|
|
|
Add option to exclude webgpu-dawn and slang-tint from the build,
for environments that need to build Slang without internet access.
|
|
* Fix a bug in default ctor synthesizing
- This is fix for the implementation bug, when a struct has explicit ctor
we should not synthesize the default ctor anymore.
- When invoke the synthesized ctor converted from initializer list, we should
check if the struct is a c-style type if it struct has no synthesized ctor. In this
case we should report error because it's invalid to use initializer list here.
- The only exception is the unsized array, we still have to fall back to use the
legacy initializer list logic to initialize the unsized array until we formalize a
proper solution.
- update test.
|
|
* Update build to allow setting external paths
Update the build to allow setting user-specific paths for the external modules.
This allows building Slang without also fetching the external modules, assuming
they are already present elsewhere locally.
|
|
* Fix lowering of `extern` types with defaults.
* Fix test.
* Fix test.
|
|
It might be beneficial for debugging issues to know what graphics
adapters are in use for CI runs.
It is also helpful to ensure the -show-adapter-info option in slang-test
doesn't bitrot.
|
|
* Update SPIRV-Tools and fix new validation errors.
* Implement pointers for glsl target.
* Reworked packStorage/unpackStorage code gen to operate on pointers rather than values.
|
|
This helps to address issue #4760.
The particular issue motivating this fix is that
IGlobalSession::parseCommandLineArguments uses a temporary compile request to parse
options.
The compile request only adds the OptionKind::ForceDXLayout (-fvk-use-dx-layout) to the
"current target" which may be the default target, which
IGlobalSession::parseCommandLineArguments didn't look for, meaning that options like
ForceDXLayout were just ignored.
This leads to test failures in tests that rely on this option, e.g.
tests/spirv/cbuffer-dx-layout-1.slang.
|
|
* Add module organization suggestion doc
Suggest one method to keep slang modules organized in the file system.
Closes #4841
|
|
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 helps to address issue #4760.
|
|
This closes issue #4771.
|
|
* Consolidate multiple inout/outs into struct
Fixes #5121
VUID-StandaloneSpirv-IncomingRayPayloadKHR-04700 requires that there be
only one IncomingRayPayloadKHR per entry point. This change does two
things:
1. If an entry point has the one inout or out, or has only ins, then
stay with current implementation.
2. If there are multiple outs/inouts, then create a new structure to
consolidate these fields and emit this structure.
These two code paths are split into two separate functions for clarity.
This patch also adds a new test: multipleinout.slang to test this.
* Address review comments
* Refactor code as per review comments
* format code
* fix failing tests
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Allow partial specialization of existential arguments.
* Fix.
* Add test case for improved diagnostics.
* Fix compile error.
* Fix tests.
* Fix.
* Fix test.
* Fix compile issue.
* Fix typo.
* Address comment.
|
|
* implement sparse residency samples for spirv
* udpate test
* separate tests to non-combined and combined sampler
* remove expected failure
* add expected failure for dx12 combined sampler test
* remove expected failure
* fix submodule merge
* add back dx12 test failure
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|