| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fix crash when handling uninitialized resource type
close #6328.
When declare a var with struct type, if the struct has a resource
type field and it doesn't provide explicit constructor, because
slang won't implicit construct such variable at declare site if user
doesn't explicitly call the initializer list, we should report the
resource type field uninitialized as an error to prevent future possible
crash when legalize any use of such variable.
|
| |
|
|
| |
Co-authored-by: Yong He <yonghe@outlook.com>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
|
|
|
|
| |
* Add raypayload decoration to ray payload structs
Closes https://github.com/shader-slang/slang/issues/6104
* Disable PAQs when compiling with DXC
See https://github.com/shader-slang/slang/issues/3448
|
| |
|
|
|
| |
fs. (#6314)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* initial work for metal subgroups
* add glsl intrinsics
* enable wave tests
* enable glsl subgroup tests, glsl barrier fixes
* minor fixes
* fix incorrect test target
* disable some glsl functional tests
* disable failing glsl test
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
| |
* Add WGSL to list of formats supporting multiple entry points
* Add a test for generating multiple WGSL entrypoints
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Use and() and or() functions for logical-AND and OR
With this commit, Slang will emit function calls to `and()` and `or()`
for the logical-AND and logical-OR when the operands are non-scalar and
the target profile is SM6.0 and above. This is required change from
SM6.0.
For WGSL, there is no operator overloadings of `&&` and `||` when the
operands are non-scalar. Unlike HLSL, WGSL also don't have `and()` nor
`or()`. Alternatively, we can use `select()`.
|
| |
|
|
|
|
| |
This case now parses after the following PR was merged.
https://github.com/shader-slang/slang/pull/6281
Co-authored-by: Yong He <yonghe@outlook.com>
|
| |
|
|
|
|
|
|
|
| |
* Support stage_switch.
* Update proposal status.
* Fix gl_InstanceID.
* Fix.
|
| |
|
|
|
| |
* Allow tuples to work with initiailizer list.
* Update definition of C-Style types.
|
| |
|
|
|
| |
* maxtessfactor attribute should take a floating point value
* Support integer value on maxtessfactor
|
| |
|
|
|
|
|
| |
* Fix DCE for calls to functions that have associations
* Update slang-ir-util.cpp
* Update slang-ir-util.cpp
|
| |
|
|
|
|
|
| |
* Use two-stage parsing to disambiguate generic app and comparison.
* Typo fix.
* Update doc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix warning about push constants, shaderRecordEXT
These resources should not warn about missing vk::binding.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
| |
entrypoint. (#6260)
* Auto enable `-fvk-use-entrypoint-name` when there is more than one entrypoint.
* Fix.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* initial work
* more work
* more work on glsl intrinsics
* add subgroup broadcast for glsl
* wip add wgsl extension tracking
* enable tests, enable extensions and added some todos
* format and warning fixes
* fix wgsl extension tracker
---------
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 ConstantIntVal::toText when the val is a enum.
* Fix comment.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix combined sampler documentation and warning
* Update comment, show detailed '-fvk-t-shift' message in warning instead of generic '-fvk-xxx-shift'
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
* Fix the type coerce issue
When synthesize the default ctor, if there is a base type
we will synthesize an InvokeExpr to call base type's default
ctor as well. But we should use the type of the inheritanceDecl
instead of base struct decl.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| |
|
|
|
| |
* Properly plumbing layout for global varyings.
* Fix test.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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.
|
| | |
|
| |
|
| |
Co-authored-by: Yong He <yonghe@outlook.com>
|