| Age | Commit message (Collapse) | Author |
|
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>
|
|
(#5702)
This closes #5613.
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Adding nonuniformEXT intrinsic for GLSL
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Closes https://github.com/shader-slang/slang/issues/5263
|
|
* Update Slang-RHI/slang
This brings in new fixes for WebGPU.
In particular, the "use_dxc" toggle is now used, which should enable these tests to run on
WebGPU, if f16 is otherwise supported:
- `tests/language-feature/generics/variadic-0.slang`
- `tests/language-feature/generics/tuple.slang`
This closes #5605.
* Disable tests/autodiff/float-cast.slang for wgpu
This test was previously not running for WebGPU because it required the 'half' render
feature, and Slang-RHI was previously not reporting it.
With the Slang-RHI update, the test now runs on WebGPU.
It now fails because the test is using 'double' which is just not supported on WebGPU.
Thus this commit disables the test.
|
|
* 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>
|
|
Require the 'half' rendering feature for WebGPU, so that we can detect when
the f16 feature is not available, for the following tests:
- tests/language-feature/generics/tuple.slang
- tests/language-feature/generics/variadic-0.slang
This helps to address issue #5605.
|
|
* 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
|
|
Some tests are now passing and are enabled.
Other tests are still failing, but are given comments categorizing the failures.
Tests in the 'Not supported in WGSL' category are also removed from the expected failures
list. (Though they are still kept disabled for WebGPU, of course.)
This closes #5519.
|
|
* 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
|
|
* Limit number of MIP levels on 1d textures to be 1
This avoids running into a WebGPU limitation, and helps to address issue #4943.
* Update Slang-RHI to get WGPU fixes
* Enable WGPU texture sampling test
This helps to address issue #4943.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
This makes tests/bugs/shadowed-lookup.slang pass on WGPU.
The underlying issue seems similar to #5277.
|
|
|
|
* Fix wgsl legalization around __ref parameter.
* Add intrinsic and test case.
|
|
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
|
|
* 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>
|
|
* Update Slang-RHI to get WGPU backend fixes
* render-test: Use device local memory type for vertex buffers
This helps to avoid https://github.com/shader-slang/slang-rhi/issues/104
* Fix bug in WGSL emitter layout code.
There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not
being used.
This patch enables a bunch of tests for WGPU.
This helps to address issue #4943.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Push buffer load to end of access chain.
* Update test.
* Fix.
* Fix.
* Fix.
* Make more robust.
* Fix.
|
|
* Transfer offset decorations when legalizing laid-out structs
Struct legalization removing fields not representable in memory should transfer all
decorations in case the struct has already had offsets calculated.
Closes #5264.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Require GL_EXT_samplerless_texture_functions only if needed
This extension is only necessary when using texture functions
on non-combined texture/samplers.
Fixes #5518
|
|
The WGPU backend was crashing because of the
unbound sampler state. Fix the test by adding
a test sampler.
Issue 5277
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
This closes issue #5505.
|
|
* Fix CUDA prelude for makeMatrix
* Add regression test.
|
|
regression. (#5508)
* Fix IntVal unification logic to insert type casts.
* Fix regression.
|
|
* Fix WGSL parameter block binding.
* Re-enable tests.
* Update failure list.
* Fix entrypoint parameters.
* Update tests.
* Enable stat-var test.
|
|
* [WGSL] Enable arbitrary arrays in uniform buffers.
* format code
* Undo irrelevant change and fixups.
* Update expected failure list.
* Fix.
* Rename.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
targeting WGSL (#5483)
Structured buffer types translate to array types in the WGSL emitter.
WGSL doesn't allow passing runtime-sized arrays to functions.
Similarly for pointers to texture handles.
Also, structured buffers (runtime-sized arrays) cannot be returned in WGSL.
This closes issue #5228, issue #5278 and issue #5288 by enabling specialized functions
to be generated in these cases, in order to work around these constraints.
|
|
* Legalize the Entry-point for WGSL
The return type of the entry-point needs to be legalized when targeting
WGSL.
This commit flattens the nested-structs of the return type and the input
parameters of the entry-point.
Most of code is copied from the legalization code for Metal. The
following functions are exactly same to the implementation for Metal or
almost same.
- flattenInputParameters() : 136 lines
- reportUnsupportedSystemAttribute() : 7 lines
- ensureResultStructHasUserSemantic() : 46 lines
- struct MapStructToFlatStruct : 176 lines
- flattenNestedStructs() : 95 lines
- maybeFlattenNestedStructs() : 42 lines
- _replaceAllReturnInst() : 19 lines
- _returnNonOverlappingAttributeIndex() : 16 lines
- _replaceAttributeOfLayout() : 23 lines
- tryConvertValue() : 41 lines
- legalizeSystemValueParameters() : 11 lines
They need to be refactored to reduce the duplication later.
The test case, `tests/compute/assoctype-lookup.slang`, had a bug that
the compute shader was trying to use the varying input/output with the
user defined semantics.
This commit removes the user defined semantics, because the compute
shaders cannot use the user defined semantics.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
Close the issue #4940.
|
|
* Fix issue of infinity float literal
* add parameters for the test
* Correct the way to construct inf and nan
In WGSL, expression of "1.0/0.0" is not allowed, it will report compile error,
so to construct infinity or nan, we have to assign the float literal to a variable
and then use it to bypass the compile error.
By doing so, we add getInfinity and getNan functions to the builtin
prelude to wgsl.
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Update slang-rhi to pick up a fix in webgpu compilation error handling.
In doRenderComparisonTestRun(), only return TestResult::Pass if the
shader is ran actually compiled.
A similar check is in place elsewhere in slang-test-main, but was
missed in doRenderComparisonTestRun().
Add two tests to the github CI skiplist, and use the skiplist in one
additional CI config that was running without it.
Closes 5291
|
|
* Fixing the wrong implementation of some math intrinsic
Close the issue #5282
The root cause of the issue is that log10 is not supported in wgsl.
So add the implementation.
Also ldexp in wgsl doesn't support float type exponent, so fix the
implementation of the intrinsic.
* re-enable the tests
|
|
* [WGSL] make sure switch has a default label.
* Various WGSL fixes.
* Update rhi submodule commit
* format code
* Remove unnecessary DISABLE_TEST directive on not applicable test.
* Matrix comp mul + `select`.
* Legalize binary ops for wgsl.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
|
|
|
|
* Enable tests/compute/func-cbuffer-param
* Enable tests/language-feature/tuple/tuple-parameter.slang
|
|
This fixes a teardown crash, and a buffer usage mismatch issue during bind group creation.
These Slang-RHI fixes allow several WGPU tests to be enabled:
- tests/compute/column-major.slang
- tests/compute/constant-buffer-memory-packing.slang
- tests/compute/matrix-layout.hlsl
- tests/compute/non-square-column-major.slang
- tests/compute/row-major.slang
- tests/hlsl/packoffset.slang
This helps to address issue #5222.
|
|
|