| Age | Commit message (Collapse) | Author |
|
inheritance decl. (#5965)
|
|
|
|
|
|
|
|
* Fix parsing GLSL SSBO arrays / bindless descriptors
* Clean up SSBO array parsing
* Fix mutable SSBO arrays not being detected as such
* Allow sized SSBO arrays
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Add packed bytes builtin type
* fix test
|
|
* add a lot of missing classes, functios and enums
* typescript defintion generation
* formatting
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
|
|
|
|
|
|
* Add base vertex and base instance system values
* Fixed incorrect stage in tests
|
|
* Implement HLSL texture sample with status intrinsics
* fix test and cleanup
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Report error when generated spirv is empty.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Close #5911.
In this issue, if we define the generic in source file 1,
and import it into source file 2, then when parsing the
reference of that generic in source file 2, we will not parse
the generic directly, instead we have a logic to speculate it
as generics first with a fake diagnostic sink, and if there is
no error report, we will consider it as a actual generic and will
parse it again.
In this logic, we will also disambiguate the expression based on
the following token, but we didn't consider the token '[', so we
will finally not treat the expression as generic.
The fix is just simply add '[' here.
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
|
|
|
|
|
|
* Allow `Optional` and `Tuple` to be used in varying input/output.
* Fix.
* format code
* Fix.
* Fix test.
* Fix.
* enhance test.
* Fix.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Add verification logic on push and specialization constants.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
|
|
Close #5470
* implement bitcast for 64-bit date type
* Move 'ensurePrelude' to base class to remove duplication
* Assert on 'double' type for Metal target, as Metal doesn't have 'double' support
|
|
* Fix entrypoint auto discovery logic.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
* Fix `getArgumentValueFloat` when arg is int.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
|
|
|
|
* promoting bitfield extraction and insertion to become intrinsics for internal compiler use
* removing duplicate intrinsics from glsl.meta.slang
* refactor: update function signatures of bitfield extraction and insertion to use uint as the parameter type for offset and bits.
---------
Co-authored-by: Nate Morrical <natemorrical@gmail.com>
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
* Split out SPIR-V -specific legalization of global functions
This is a refactoring and should not affect generated code.
* Move global inst inlining code into separate function
This is a refactoring and should not affect generated code.
* Take SPIR-V -specific parts out of GlobalInstInliningContext
This is a refactoring and should not affect generated code.
* Move 'inlineGlobalValues' to generic inlining context
This is a refactoring and should not affect generated code.
* Move 'setInsertBeforeOutsideASM' to generic inlining context
This is a refactoring and should not affect generated code.
* Move generic inlining context into own file
This is a refactoring and should not affect generated code.
* Run global inlining for WGSL as well
* Make the 'getOutsideASM' function generic as well
* Enable language-feature/constants/static-const-in-generic-interface.slang for WebGPU
* Clarify when it's safe to remove and deallocate an IRInst
* Remove globals if they're left unused after inlining
This closes #5607.
* Handle IRGlobalValueRef in C-like emitter
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
|
|
Partially sorts https://github.com/shader-slang/slang/issues/5843
|
|
|
|
|
|
|
|
* Back out "Update SPIRV submodules (#5815)"
This backs out commit e50aac13e2c161d672b137a62f6d66820d0f9ff1.
* Use upstream spirv-tools
* Fix bump-glslang.sh for newer versions of spirv-tools
* Use upstream glslang
* Add --do-fetch option to bump glslang
* Bump glslang and friends
Supersedes https://github.com/shader-slang/slang/pull/5815
* Regenerate glslang and spirv-tools outputs
* Fixes to slang-glslang
* Correct spirv intrinsic for OpImageSampleFootprintNV
Note that this currently fails validation with the following error:
```
error: line 145: Result <id> from OpSampledImage instruction must not appear as operand for OpImageSampleFootprintNV, since it is not specified as taking an OpTypeSampledImage. Found result <id> '55[%sampledImage]' as an operand of <id> '56[%resultVal]'.
%sampledImage = OpSampledImage %54 %51 %40
```
This seems to be in error as the spec for
*SPV_NV_shader_image_footprint* states that "Sampled Image must be an
object whose type is OpTypeSampledImage"
https://refined-github-html-preview.kidonng.workers.dev/KhronosGroup/SPIRV-Registry/raw/refs/heads/main/extensions/NV/SPV_NV_shader_image_footprint.html
glslang also seems to fail with the same validation error
* Fix spv storage class test
|
|
|
|
|
|
* Fix fast single iteration loop test in redundancy pass.
* Fix.
|
|
* Fix attribute reflection.
* Fix.
* Fix.
|
|
* Update SPIRV submodules
With the latest SPIR-V submodules, one of tests started failing:
tests/gpu-feature/texture/query/footprint/nv-shader-texture-footprint.slang
[ForceInline] is added to GLSL texture functions in order to inline %true and %false.
Without it, the value was indirectly passed down via a function parameter, which broke the existing test.
Also the test is modified to use -DAG, because the order unpredictably changed for Grad variants due to additional [ForceInline] marks for Gradient functions.
A new validation check in SPIRV-Tools was causing a validation error:
```
error: line 324: [VUID-StandaloneSpirv-OpTypeImage-06924] Cannot store to OpTypeImage, OpTypeSampler, OpTypeSampledImage, or OpTypeAccelerationStructureKHR objects
OpStore %17 %242
```
It appears that this is a bug on SPIRV-Tools.
A proper fix is proposed to Khronos/SPIRV-Tools:
https://github.com/KhronosGroup/SPIRV-Tools/pull/5914
But this commit uses `shader-slang/SPIRV-Tools/fix_for_OpImageSampleFootprintNV` with a custom fix as a temporary solution:
https://github.com/shader-slang/SPIRV-Tools/tree/fix_for_OpImageSampleFootprintNV
|
|
* Fix anyvalue marshalling for matrix types.
* Add support for 64bit types marshalling.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
|
|
* Allow glsl set and binding layout qualifiers to be compile time integer exprs
* add new tests
* add comments
* cleanup on asserts
* addressed review comments and cleanup
* fix missing set expr in test
* fixed tests and cleanup
---------
Co-authored-by: Yong He <yonghe@outlook.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
half. (#5814)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
|
|
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
* Fix pointer offset logic and add executable tests.
* Fix.
* Fix test.
* Add existential ptr test.
* Allow pointers to existential values.
* Fix.
* Fix.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
|
|
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>
|