| Age | Commit message (Collapse) | Author |
|
* fix non-static methods when trying to synthesize method requirement witness
* add tests
* update test
* improve test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* fix calcSubtract on UIntSet
* add test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Add slangpy proposal
* Fix.
|
|
* Allow requiring glsl language extensions on structs
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* 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 an example for reflection of parameter blocks
The example loads a shader program, compiles it for Vulkan, and then uses reflection information to set up descriptor set layouts and a pipeline layout.
It then validates that the pipeline layout that is created is compatible with the compiled code, by using them together to make a pipeline state object with the validation layer enabled.
The basic flow of the application follows the presentation in the companion article, and references its sections.
This is example could be expanded in a few ways:
* A D3D12 path could be added, to show the comparable operations for creating a root signature from reflection data
* The existing shader could be modified to touch/use more of its parameter data, to help ensure that any errors would be caught by the validation layer
* The set of shader files/modules that get loaded automatically could be expanded, to test more cases
* The code could be expanded to handle more than just compute shaders, by allowing for multiple-entry-point files to be loaded for rasterization or ray-tracing pipelines
* format code
* fixup: build errors
* format code
* fixups for build
* fixup
* fixup
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Properly plumbing layout for global varyings.
* Fix test.
|
|
* Fix an incorrect iteration with a workList
We cannot modify workList while iterating it, because its type `List` is
actually an array container.
* Change based on the feedback
* Use `Index` instead of `int` for for-loop index
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
|
|
* Sharpen the requirements for formatting
* Add option to only format files changed since a given revision
* Avoid divison-by-zero when total is zero
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Add intptr_t abs/min/max operations for CPU & CUDA targets
* Define intptr_t and uintptr_t with CUDACC_RTC
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* add brga8 format
* add tests
* minor fixes
* cleanup
* maybe fix broken quad control test
* add missing xslang flag on test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Add SLANG_ENABLE_RELEASE_LTO cmake option
* Fix cmake static build
* Disable install SlangTargets to avoid static build failing
|
|
* Fix incorrect resolve of specialization instance
While checking the uninitialized variables, we were not resolving the
specialized instance correctly. This commit repeats the resolve while
the result is a specialization instance. A new test is added for this:
tests/diagnostics/uninitialized-generic.slang
After the problem is fixed, it revealed another problem in existing
tests:
tests/compute/nested-generics2.slang
tests/diagnostics/uninitialized-local-variables.slang
When a struct has a member variable whose type is a generic type,
we cannot iterate over its member variables yet, because the type
is unknown until the generic function/struct is specialized. We will
have to give up checking for these cases.
|
|
* Cache and reuse glsl module.
* Fix.
* Implement record/replay for the new api.
* Fix record replay.
* Fix test.
|
|
* Reimplement the GLSL atomic* functions in terms of __intrinsic_op
Many of these functions map directly to atomic IR instructions.
The functions taking atomic_uint are left as they are.
This helps to address #5989, since the destination pointer type validation can then be
written only for the atomic IR instructions.
* Add validation for atomic operations
Diagnose an error if the destination of the atomic operation is not appropriate, where
appropriate means it's either:
- 'groupshared'
- from a device buffer
This closes #5989.
* Add tests for GLSL atomics destination validation
Attempting to use the GLSL atomic functions on destinations that are neither groupshared
nor from a device buffer should fail with the following error:
error 41403: cannot perform atomic operation because destination is neither groupshared
nor from a device buffer.
* Validate atomic operations after address space specialization
Address space specialization for SPIR-V is not done as part of `linkAndOptimizeIR`, as it
is for e.g. Metal, so opt out and add a separate call for SPIR-V.
* Allow unchecked in/inout parameters for non-SPIRV targets
* Clean up callees left without uses during address space specialziation
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Use SPIRV integer vector dot product instructions
* fix test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* fix metal entry point global params
* address review comments, cleanup and test
* remove dead code
* undo accidental change
* address review comments and cleanup
* minor fix and cleanup
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Pick up fix to https://github.com/shader-slang/slang/issues/5859
|
|
This closes #5950.
|
|
* Fix bug: IgnoreInheritance in lookup
When specifying IgnoreInheritance in lookup, it will ignore
all members in the self extension for generic, the reason is
that it doesn't specialize the target type of the extension
decl when comparing with self type, so it will result that every
type is unequal to the target type.
|
|
OptimizationLevel::Maximal (#6137)
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(#6121)
* Fix circularity issue with checking multiple generic interface constraints
* Create multi-generic-interface-constraint.slang
* Update multi-generic-interface-constraint.slang
* Update slang-check-inheritance.cpp
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Add groupshared atomic array test.
* Fix test.
|
|
* Allow __subscript<T> syntax.
* Fix.
|
|
* Refactor _Texture to constrain on texel types.
* Fix tests.
* Fix.
* Disable glsl texture test because rhi can't run it correctly.
|
|
|
|
* 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>
|
|
* Fix nullptr in generic specialization
* Fix formatting
* Revert "Fix nullptr in generic specialization" and add emitPtrLit instead
* Add type parameter to getPtrValue()
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Fix prebound parameter pack - argument list matching logic.
* Move tests.
* Fix.
|
|
* Add test that reproduces the issue in #5986
* Call moveGlobalVarInitializationToEntryPoints for WGSL as well
This closes #5986.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
not considered properly. (#6099)
* Fix resource specialization issue where stores from inlined calls are not considered.
* Format
|
|
* Fix cyclic lookups with UnscopedEnums
* Add test with multiple unscoped enums with explicit types
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|