| Age | Commit message (Collapse) | Author |
|
linktime const. (#5791)
* Fix crash during emitCast of attributed type.
* Allow [MaxIters] to take link time constants.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Fix reflection for pointer element types.
* Fix.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Report error on nested functions.
* Fix.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
|
|
|
|
* Respect explicit bindings in wgsl emit.
* Implement explciit binding generation for metal and wgsl.
* Update toc.
* Fix warnings in tests.
* Fix tests.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
|
|
* Add API for getting last internal error message
* format code (#5773)
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* make message thread_local
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Add missing float image format inference
* Drop float4 inference and adjust test
* Do wgsl float format fix at emit time
* improve formatting
* format code
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Closes https://github.com/shader-slang/slang/issues/5764
Also mention other installed targets in cmake config
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
|
|
|
|
|
|
* Add intrinsics for aligned load/store.
* Fix.
* Update comment.
* Implement aligned load/store as intrinsic_op.
* Fix.
* Add proposal doc.
* fix typo.
|
|
* Make non-suffixed integer literal type resolution conform to C
* Update integer literal tests
* Clean up integer literal implementation a bit
* Update docs on integer literals
* Clean up docs update
* Clean up docs update
* Add comment on INT64_MIN edge case
* Fixed failing test, fixed formatting and cleaned up code
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
In order to emit fast target implementations of some Metal-based
functions (fmin(), fmax(), fmin3(), fmax3(), fmedian3()) on all
targets, remove some specification regarding the handling of NaNs,
and also remove the enforcement of the specification.
These functions are now documented to be basically undefined now
in the presence of NaN input, to make the common "is a number"
case fast.
Also, clarify that powr() is undefined when given a non-positive
base input value, allowing us to remove an additional abs()
operation that was unnecessarily coercing results to be predictable
on non-Metal targets.
Closes #5580
Closes #5581
Closes #5587
|
|
* Install PDB files when available
Closes https://github.com/shader-slang/slang/issues/5562
* format code
* format code
---------
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
After #5671, when a build is done, the doc file is regenerated
from the capdef file resulting in a changed file in the build
tree.
Fixing the typo in the capdef file prevents that from happening.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Minor fixes to AD documentation
* Add a note warning about experimental behavior
* Update vulkan
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Domain stage should emit one more `OpExecutionMode` with
`SpacingEqual`, similary to how Hull stage does.
Currently Hull stage emits four OpExecutionMode as following:
OpExecutionMode %hullMain SpacingEqual
OpExecutionMode %hullMain OutputVertices 4
OpExecutionMode %hullMain VertexOrderCw
OpExecutionMode %hullMain Quads
And Domain stage emits only one OpExecutionMode:
OpExecutionMode %domainMain Quads
This commit adds the following instruction for Domain stage:
OpExecutionMode %domainMain SpacingEqual
It is because the Vulkan Validation Layer prints error when the
Domain shader didn't have `OpeExecutionMode SpacingEqual`.
`SpacingEqual` corresponds to an attribute, `[partitioning("integer")]`,
given to the Hull stage. Although Domain stage is not marked with
same attribute, it is assumed to use the same value used for
matching Hull Stage.
The error message from VVL is following:
```
vkCreateShadersEXT(): pCreateInfos[2].stage is VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT,
but spacing is not specified. The Vulkan spec states: If codeType is VK_SHADER_CODE_TYPE_SPIRV_EXT,
and stage is VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, pCode must contain an OpExecutionMode
instruction specifying the spacing of segments on the edges of tessellated primitives
(https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-VkShaderCreateInfoEXT-codeType-08874)
```
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Adding nonuniformEXT intrinsic for GLSL
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Enable tests/language-feature/enums/strongly-typed-id.slang
* Fix operator signedness mismatch issue
This helps to address issue #5606.
* wgsl: Insert casts for integer type return values
This closes #5606.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* wgsl: Do not generate L-value swizzle expressions
* Enable tests/language-feature/swizzles/matrix-swizzle-write-*.slang
The following tests are enabled
- tests/language-feature/swizzles/matrix-swizzle-write-swizzle.slang
- tests/language-feature/swizzles/matrix-swizzle-write-array.slang
This closes #5603.
|
|
* Enable hlsl-intrinsic/byte-address-buffer/byte-address-struct
* Set byte address buffer legalization options for WGSL
|
|
* wgsl: Support interpolation modifiers
* Move struct key decorations to flattened structs.
** This includes interpolation mode decorations, which must be in the flattened struct.
* Emit interpolation attribute.
* Enable tests/render/nointerpolation.hlsl for WGSL, as a result.
This closes #5625.
* Add new expected output for 'nointerpolation' test
|
|
attributes (#5670)
* wgsl: Make sure each shader input field has a semantic
This closes #5633.
* Add test for inter-stage variables without semantics
This verifies the fix of the second issue identified in
https://github.com/shader-slang/slang/issues/5633
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* wgsl: Fix field semantics even if input struct doesn't need flattening
Helps to address issue #5633.
* Add test for multiple stage IO locations
This verifies part of issue #5633.
|
|
can't be automatically inferred (#5630)
* [AD] Add support for resolving custom derivatives where generic parameters can't be automatically inferred
* Fix failing tests
* Update custom-derivative-generic.slang
|
|
* Don't treat StrcturedBuffer<IFoo> as a specializable param.
* Fix RHI.
|
|
* Add datalayout for constant buffers.
* Fixes.
* Fix test.
* Fix glsl codegen.
* Update spirv-specific doc.
* Fix test.
* Fix binding in the presense of specialization constants.
* address comments.
* Add a test for constant buffer layout.
|
|
* render-test: Add copy-source usage for render targets
I found that Slang-RHI/WGPU was not able to copy from render targets to staging buffers.
This helps to address issue #4943.
* Add entries to render API util infos
Entries for glsl-cross and glsl-rewrite are added.
Without glsl-cross, slang-test fails to select a back-end, and winds up crashing when
tests/render/cross-compile-entry-point.slang is enabled
tests/render/cross-compile0.hlsl fails similarly without glsl-rewrite.
* Enable some rendering tests
* Add expected test outputs
|
|
* Change how DeclRef::toText works
We now ignore the decl-ref heirarchy since that only includes nodes with specialization info & simply walk up the tree of decls, while emitting any specializations present in the decl-ref.
* Update some tests. Add cases for direct refs to generic params & Lookup decl refs
|
|
Fixes #5579
|
|
* Minor core lib doc fixes
Fixing a couple functions that were missing their categorization.
Also cleaned up some trailing spaces.
* Update hlsl.meta.slang
|
|
|
|
* Fix wgsl legalization around __ref parameter.
* Add intrinsic and test case.
|
|
* Document math core lib functions
Closes #5446
* Update hlsl.meta.slang
* Update hlsl.meta.slang
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
* Implement semantics for WGSL
This helps to address issue #4943.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
functions. (#5585)
|
|
* Add `IDifferentiablePtrType` support for arrays
- Also fixes an issue with spirv-emit of constructors that contain references to global params
* Fix GLSL legalization for arrays of resource types
|
|
* Embed core module in wasm build.
* format code
* add uintptr_t case.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Add new texture sampling test for WebGPU
There are no 1d array textures in WGSL, so
add texture-sampling-no-1d-arrays.slang based on texture-sampling.slang, but without
1d texture arrays.
This helps to address issue #4943.
* Insert needed conversion when querying texture attributes in WGSL
This helps to address issue #4943.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
This stops adding the repo root to the include path for anything linking
with slang. This enabled a bunch of convenient includes, but might lead
to confusing behavior for anyone including slang. Not to mention
differences including it from an install vs source.
Co-authored-by: Yong He <yonghe@outlook.com>
|