| Age | Commit message (Collapse) | Author |
|
* Language server: sort completion candidate by relevance.
* Small adjustment.
|
|
* Initial plan
* Implement copysign forward and backward derivatives
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Fix copysign test format to use expected.txt file
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Add wgsl support to copysign and fix y==0 derivative case
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Add wgsl support to copysign helper functions
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Fix copysign derivative to return 0 when either x or y is 0
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
|
|
* Language Server: auto-select the best candidate in signature help.
* Fix constructor call highlighting + goto definition.
* Add test.
* format code
* Improve ctor signature help.
* Add tests.
* Fix decl path printing for extension children.
* Allow goto definition to show core module source.
* c++ compile fix.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Replace SLANG_ALIGN_OF with C++11 alignof
* Fix formatting (again)
|
|
* Add test for mixed use of uniform/ParameterBlock
Adds a test that uses the same struct as a parameter and as a
ParameterBlock.
* Fix for SPIRV block declaration issue
Fixes #7431
* Fix formatting
* Collect struct param usage in first pass
Reduces number of iterations over the entire program.
* more formatting fixes
* formatting
* Remove unused variable
|
|
This commit removes the following test from expected-failure-github.txt
because the issue is addressed on slang-rhi side.
tests/compute/cbuffer-legalize.slang.2 syn (mtl)
|
|
* don't use access::sample for multisample texture
* Add test case
* format code (#7603)
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>
|
|
Enable intrinsic tests for cuda. Most of these tests were either
disabled or just not enabled for cuda.
Fixes #7592
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Initial plan
* Fix crash in WGSL L-value cast lowering with type mismatches
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Apply formatting to fix
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Update test to verify successful compilation instead of error checking
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* emit var and hoist out OpSelect if Composite
* cleanup comment
* address review
check for version in spv context
use phi node instead of using var
move inst's using a list (not in-place modification)
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Initial plan
* Fix spurious vk::binding warnings when attribute is present
- Modified _maybeDiagnoseMissingVulkanLayoutModifier to check for GLSLBindingAttribute before warning
- Changed function to return bool indicating if warning was actually issued
- Updated call sites to properly track warning state to reduce duplicates
- Tested fix resolves the issue while preserving correct warnings when needed
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Add test case for vk::binding spurious warning fix
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Update test to use filecheck format as requested
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Remove full file path from CHECK directives as requested
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Fix code formatting with clang-format
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
* Fix behavioral regression in vk-bindings test caused by warning flag logic
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* WIP opaque type decoration fix
* Clearer intent
* Formatting
* Added test for fix
|
|
* Defer immutable buffer loads when emitting spirv.
* Fix.
* Fix.
* Fix.
* Fix tests.
* Fix test.
|
|
* Misc language server improvements.
* Fix.
* Fix decl path printing for existential lookup.
* More existential decl path fix.
* Polish.
* Fix test.
|
|
functionality (#7067)
* Add link time array layout test
* Add link time constant array size compilation test
* Link time constant array size test
* Allow getting link time array size
Closes https://github.com/shader-slang/slang/issues/6753
* format
* Switch to SIMPLE test and check output
* Implement without binary api changes
* diagnose on link time constant sized array
* fix test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Implement -fp-denorm-mode slangc arg
* Split fp-denorm-mode into 3 args for fp16/32/64
* Remove redundant option categories
* Use emitInst for multiple of the same OpExecutionMode
* Fix formatting
* Remove -denorm any
* Re-add option categories
* emitinst for ftz
* Use enums for type text
* Remove extra categories again
* Add tests for denorm mode
* Move denorm mode to post linking
* format code (#8)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* regenerate command line reference (#9)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Clean up tests
* Fix option text
* format code (#10)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Add tests for "any" mode
* Return "any" enum if option not set
* Simplify emission logic
* Add support for generic entrypoints
* Move denorm modes to end of CompilerOptionName enum
* format code (#11)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Move new enum members to before CountOf
* Add not checks to tests, fix generic test, add functionality tests
* Rename denorm to fpDenormal
* Clean up functional test
* Rename denorm test dir
* Fix formatting, regenerate cmdline ref
* Fold simple tests into functional tests, add more dxil checks
* Remove no-op DX tests, make tests more consistent
* Disable VK functionality tests that will fail on the CI configs
* Fix formatting
* Add comments to disabled tests explaining why
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* fix #7554
* format code
* test ms and non ms texture
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Add MLP training examples.
* Formatting fix.
* Fix.
* Improve documentation on coopvector.
* Improve doc.
* Update doc.
* Fix typo.
* Cleanup shader.
* Cleanup.
* Fix test.
* Fix type check recursion.
* Fix.
* Fix.
* Fix override check.
|
|
* Test for IFloat.scale usage
Test that using IFloat.scale doesn't cause an internal compiler error.
* Generic implementation of IFloat.scale()
Fixes #7156
* Implement IFloat.scale for matrix
Adds matrix implementation and test coverage.
* Avoid explicitly constructing a matrix
* Remove intrinsicOp from IFloat.scale impls
Updates IFloat.scale implementations:
- Remove __intrinsic_op($(kIROp_Mul)) since we're providing an
implementation
- Add [__unsafeForceInlineEarly] where missing
|
|
* Support DeviceIndex
* format code
* regenerate command line reference
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Parse optional witness syntax
* Allow failing optional constraint
* Make `is` work with optional constraint
* Allow using optional constraint in checked if statements
* Fix tests
* Make it work with structs
* Fix MSVC build error
* Disallow using `as` with optional constraints
* Update test to match split is/as errors
* Add tests
* Fix uninitialized variables in tests
* Add tests of incorrect uses & fix related bugs
* Mention optional constraints in docs
* format code
* Fix type unification with NoneWitness
* Fix formatting
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Nathan V. Morrical <natemorrical@gmail.com>
|
|
* Disable spirv-opt for the tests with debugfunction VVL errors
* Enable VVL in CI
* Add 2 expected failure tests until we update VVL to 1.4.319 which contains the fix
* update slang-rhi
* Revert "Disable spirv-opt for the tests with debugfunction VVL errors"
This reverts commit 5327460057f533af81ea60a556e43abe805d5816.
|
|
* Fix tuple AST & IR layout size queries
* Don't peephole sizeof if size is still indeterminate
|
|
* Fix for OpUConvert outputting scalar type for mixed sign vector type conversions
* Fix compiler warning
* Added regression test for UConvert vector fix
* Formatting
* getUnsignedType helper
* Formatting
* Fix for addtional int types
* Helper function to convert signed type to unsigned type
|
|
* Fix the invalid SPIRV decoration issue
Close #7508.
SPIRV doesn't allow decoration on type with Private or Function storage
class.
In our lowering logic, if the array type is used by buffer type it
will always have stride operand after lowering, so if the array is not
used by buffer type, it must be used only by thread_local or
group_shared variable, and it will not have stride operand. For this
case, we don't need to emit stride decoration for SPIRV.
|
|
* Correct the scope for DebugLocalVariable
All of the DebugLocalVariable instructions have their scope
set to DebugCompilationUnit. The scope should instead be set
to a DebugFunction, or a DebugLexicalBlock which is recursively
inside a DebugFunction.
Register the debug info for the function instructions, which
helps findDebugScope() to find the right DebugFunction scope
for DebugLocalVariable.
* Add a test for DebugLocalVariable
To check the scope, which should be a DebugFunction.
|
|
* Add matrix operand for OpCooperativeVectorMatrixMulAddNV
* update tests to use the supported UINT32 input component type
* Add MatrixCSignedComponentsKHR for coopVecMatMulAddPacked
---------
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
|
|
(#7499)
* Make phi elimination pass modify branches in-place
* Add test and fix formatting
* Avoid double removal of param insts
|
|
Close #7509.
When there are both `export` and `extern` decls in lookup result,
we should remove all `extern` decls.
|
|
* Fix generation of wgsl case arms
* Added test case to test generation of switch case
---------
Co-authored-by: Harsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com>
|
|
|
|
* Fix the ignored unit-tests on retry
* Retrigger CI
* Add more error messages
* Don't use test-server for retry of unit-test to see error messages
* Clean up cl.yml
Remove 'has-gpu' because it is unused after debug became full-gpu-test.
Renamed files to make the meaning more clear:
- Renamed expected-failure.txt to expected-failure-via-glsl.txt
- Renamed expected-failure-github-runner.txt to expected-failure-no-gpu.txt
* Rename cpu-hello-world.slang to avoid name conflict to example
We have an example whose executable name is cpu-hello-world.exe.
It gets built when you run `cmake --build`, but it gets overwritten by
slang-test when it tests `tests/cpu-program/cpu-hello-world.slang`.
This PR renames to avoid the name conflict.
* Remove debug code
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Fix coopvector neg intrinsic.
* Add test case.
|
|
* fix: add sampleCount and mipMaps to st2DMS_f32v4
Fix VUID-VkImageCreateInfo-samples-02257:
The Vulkan spec states: If an OpTypeImage has an MS operand 1,
its bound image must not have been created with
VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT
* Fix VUID-VkShaderModuleCreateInfo-pCode-08740
Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
* fix: add sampleCount and mipMaps to st2DMS_f32v4
Fix VUID-VkImageCreateInfo-samples-02257:
The Vulkan spec states: If an OpTypeImage has an MS operand 1,
its bound image must not have been created with
VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT
* Fix VUID-VkShaderModuleCreateInfo-pCode-08740
Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
* Fix VUID-vkCmdDispatch-None-06479
Use correct format for combined depth texture.
* Fix VUID-vkCmdDispatch-format-07753 by setting format
Parse filtering mode for sampler because the RGBA8* formats do not
support linear filtering
* Create MS texture type for sample count > 1
* Use different texture formats for depth compare and gather ops
* Use clearTexture for init the data for MS textures
|
|
* Fix false negative result for CUDA with recent versions
From CUDA version 12.8 and above, nvrtc returns an exit code treated as
an error. Some of slang-test test cases had to change from TEST to
DIAGONOSTIC_TEST to handle it properly.
|
|
* Add additional completion keywords.
* LanguageServer: Enhance auto completion for `override`.
|
|
* Cast if there is a signedness mismatch on the swizzle
* Move isSignedType to slang-util and add test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Require `override` keyword for overriding default interface methods.
* Update doc.
* Fix test.
|
|
* Add test case for missing import attribution
Add a test case that imports a non-existent file, followed by a valid
file. Tests for absence of a bug where slang reports existent files as
non-existent if they're imported after a non-existent file.
* Skip processing imports after errors
Skip processing additional imports after the first error. This
behavior is already observed in Linkage::loadSourceModuleImpl, but
since that happenes after import processing already started, a false
diagnostic gets generated for a missing import.
By hoisting this check out before the import is processed, the
diagnostic message for a missing file is no longer erroneously
generated.
Fixes #6453
* Revert "Skip processing imports after errors"
This reverts commit 6b2fef09782414de4c5e017c4ecb5f2affa0c199.
* Remove early abort of import processing
Partial revert of commit 04f1bad
Reverts an early return in Linkage::loadSourceModuleImpl() whenever any
error diagnostic message has already been generated. This was causing
earlier errors to prevent subsequent imports from succeeding, and was
misattributing them to a missing file.
Fixes #6453
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
|
|
Close #6176.
If the struct has a `no_diff` member, it should not be its Differential
type. We miss this check.
|
|
* Add new capdef for lss intrinsics
Fixes #7426
Raygen shaders need to be supported for only hitobject APIs. So we need
a special capability for that, instead of a common one.
* regenerate command line reference
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Fix issue of missing scope for 'Differential' type
When we synthesize the struct decl for Differential type, we should
add the ownedScope for this decl, because the scope is used in lots
of locations in the following synthesized processes, e.g. constructor
synthesize. And that could cause surprising behavior, e.g. the 'this'
expression could access the members of parent struct decl.
Fix the issue by adding the scope. The containerDecl will be the
Differential struct decl itself, parent scope will be the parent struct.
* Add a unit-test
|
|
Results of these tests had been marked ignored, because they failed on
VK with the GLSL backend. This change removes them from the
expected-failure.txt file and adds the correct command line option to
avoid using the GLSL target.
Addresses concern raised on #7282
|
|
* Diagnose on use of struct inheritance.
* fix test.
* Fix tests.
* fix.
---------
Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
|
|
This PR replaces enable/disable style C function calls with C++ RAII style code.
In debug build, when an assertion failed in between enable and disable functions, an exception is thrown and the disable function is not called. RAII style code is safer for an exception
|
|
* Fix an issue in extension override.
* Fix typo in comment.
|
|
Apply argument buffer tier2 rule when using parameter block for Metal target.
Close #6803.
|
|
This allows checking capabilities in any stage, needed specifically for
the hlsl_2018 capability which is defined for sm_5_1 and above. Stage
specific capabilities such as cs_5_1 would not find this in any stage
other than compute, so we need to restrict the check to only desired
stages.
|