summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-12-17Add verification logic on push and specialization constants. (#5887)Yong He
* Add verification logic on push and specialization constants. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-12-17Support specializing generic entrypoints in `findAndCheckEntryPoint`. (#5890)Yong He
2024-12-17Implement bitcast for 64-bit date type (#5895)kaizhangNV
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
2024-12-17Fix entrypoint auto discovery logic. (#5885)Yong He
* Fix entrypoint auto discovery logic. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-12-17Update 09-reflection.md (#5886)Yong He
2024-12-18Fix `getArgumentValueFloat` when arg is int. (#5888)Yong He
* Fix `getArgumentValueFloat` when arg is int. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-12-16Support matrix negation in metal backend. (#5891)Yong He
2024-12-16install mono for toc generation (#5877)Ellie Hermaszewska
Closes https://github.com/shader-slang/slang/issues/5876
2024-12-15Enable exprs for all supported GLSL layout qualifiers (#5857)Darren
2024-12-13Update reflection API chapter in User Guide (#5868)Theresa Foley
* Update reflection API chapter in User guide The new version of the chapter is intended to accompany the `reflection-api` example program, and reflects (pun intended) the best practices that the Slang project team wants to encourage for interacting with the reflection API. * Rebuild TOCs
2024-12-12Make slang-rhi's NVAPI support conditional on SLANG_ENABLE_NVAPI (#5855)Ellie Hermaszewska
* bump slang-rhi * More precise slang-rhi settings --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-12Bit extract (#5847)kaizhangNV
* 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>
2024-12-12use Release over RelWithDebInfo for ci (#5846)Ellie Hermaszewska
This will necessetate changing the "required tests" setting on the GitHub repo Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-12Add an example for using the reflection API (#5839)Theresa Foley
* Add an example for using the reflection API The example program is meant to accompany a document that goes into more detail about the mental model behind the reflection API and the way this program drives it. Ideally this program can land before the document goes live, and then the document can be published with a link to the example. After that, the example could be updated to include links into the live document. Along with adding the example program, this change also adds some convenience functions to the reflection API to avoid cases where the program would otherwise need to cast between `slang::ParameterCategory` and `SlangParameterCategory`. * format code * fixup: error noticed by clang --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
2024-12-12WGSL: Fix issue where global calls are generated (#5768)Anders Leino
* 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>
2024-12-13Add SLANG_ENABLE_DXIL (#5853)Ellie Hermaszewska
2024-12-13Correctly distinguish between windows and MSVC (#5851)Ellie Hermaszewska
Partially sorts https://github.com/shader-slang/slang/issues/5843
2024-12-13Set default hidden visibility for all source on gcc (#5850)Ellie Hermaszewska
2024-12-13Add missing header for _getpid() (#5852)Ellie Hermaszewska
2024-12-13Bump imgui for include fix (#5854)Ellie Hermaszewska
2024-12-12Correct casing of windows includes (#5849)Ellie Hermaszewska
2024-12-12Fix prebuilt dependencies filenames on non-windows platforms (#5848)Ellie Hermaszewska
2024-12-11Fix language server check skipping when explicit module decl exists. (#5845)Yong He
2024-12-12Bump spirv-header/tools/glslang (#5834)Ellie Hermaszewska
* 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
2024-12-11LSP: fix "documentSymbol failed" error. (#5842)Yong He
2024-12-11Use perfect forwardnig to preserve the parameters for log (#5841)Jay Kwak
Avoid mixing the variadic template argument and pass-through it with std::forward
2024-12-11Fix the logic to determine whether lower generic pass should run. (#5837)Yong He
2024-12-11Fix loop hoisting logic in redundancy pass. (#5836)Yong He
* Fix fast single iteration loop test in redundancy pass. * Fix.
2024-12-11Fix attribute reflection. (#5823)Yong He
* Fix attribute reflection. * Fix. * Fix.
2024-12-11Update SPIRV submodules (#5815)Jay Kwak
* 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
2024-12-11Fix anyvalue marshalling for matrix and 64 bit types. (#5827)Yong He
* Fix anyvalue marshalling for matrix types. * Add support for 64bit types marshalling. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-11Fix wgsl float texture format inference silent failure (#5831)Devon
2024-12-10A small mistake. (#5819)HappyLi3
The 'samplerInfo.magFilter' should match the 'desc.magFilter'. Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-10Enable WGSL tests that works for Metal related to Semantics (#5816)Jay Kwak
* Enable WGSP tests that works for Metal related to Semantics This commit enables existing tests for WGSL that are enabled for Metal regarding the Semantics.
2024-12-10Correct proposal number (#5809)Ellie Hermaszewska
Co-authored-by: Yong He <yonghe@outlook.com>
2024-12-10Enable exprs for GLSL binding layout qualifiers (#5807)Darren
* 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>
2024-12-10Add more details on PR process to CONTRIBUTING.md (#5812)Jay Kwak
* Add more details on PR process This commit adds more detailed explanations on the PR process. It also fixed a few typos and grammar mistakes identified by LLM.
2024-12-10Create scope for synthesized property decl. (#5817)Yong He
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-10Fix a crash when search for files. (#5818)Yong He
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-10Don't emit a warning when implicit casting from known in-range int lit to ↵Yong He
half. (#5814) Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-10Fix parsing logic of for loops' initial statement. (#5813)Yong He
2024-12-09Add SV_DrawIndex. (#5787)Yong He
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-09Fix pointer offset logic and add executable tests. (#5790)Yong He
* Fix pointer offset logic and add executable tests. * Fix. * Fix test. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-09Allow pointers to existential values. (#5793)Yong He
* 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>
2024-12-09Fix crash during emitCast of attributed type, allow MaxIters to take ↵Yong He
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>
2024-12-09Fix reflection for pointer element types. (#5797)Yong He
* Fix reflection for pointer element types. * Fix. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-09Report error on nested functions. (#5792)Yong He
* Report error on nested functions. * Fix. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-09Fix crash on recursive types. (#5796)Yong He
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-09Add Sampler*Shadow type aliases. (#5789)Yong He
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
2024-12-06Update slang-ast-decl-ref.cpp (#5786)Sai Praveen Bangaru