summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2024-08-26Implement `-fvk-use-dx-layout` (#4912)ArielG-NV
* Implement `-fvk-use-dx-layout` Fixes: #4126 Changes: * Added fvk-use-dx-layout * Modified `HLSLConstantBufferLayoutRulesImpl` for correctness (ex: Array is always 16 byte aligned) * Added kFXCShaderResourceLayoutRulesFamilyImpl and kFXCConstantBufferLayoutRulesFamilyImpl to handle fvk-use-dx-layout * Added `ConstantBufferLayoutRules` to manage constant buffer rules * Added `alignCompositeElementOfNonAggregate`/`alignCompositeElementOfAggregate` to handle forced alignment of composites for ConstantBuffers * `StructuredBuffer` rules are mostly equal to `scalar` layout, not much was needed to be changed to support this behavior. * seperate legacy constant buffer and how Slang does constant-buffer normally * undo an addition * remove accidental test * Address review and fix Address review and remove GLSL support since GLSL requires a seperate legalization (need to linearlize structs like with `legalizeMetalIR` to assign explicit offsets) * comments * remove aggregate and non-aggregate logic We don't need this distinction for the logic --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-08-22Add skeleton of a language reference. (#4808)Theresa Foley
The files being checked in here were initially written 2-3 years ago. They are very clearly incomplete, outdated and, quite often, inaccurate. The intention of this change is to get an initial skeleton in place for the large-scale structure of a language reference (for now avoiding the term "specification" and all the weight it carries). Future commits should be able to add to flesh out this skeleton and start to make the document more complete and more accurate.
2024-08-21Dont require llvm for building generators (#4895)Ellie Hermaszewska
* Dont require llvm for building generators * Fetch slang-llvm.so from correct release (#4847) * Fetch slang-llvm.so from correct release Closes https://github.com/shader-slang/slang/issues/4648 Should close https://github.com/shader-slang/slang/issues/4812 * Update docs * Correct documentation on cmake option * Neaten cmake script * Fix fetching on windows --------- Co-authored-by: Yong He <yonghe@outlook.com> * Be a bit more careful dealing with release list fetching failure * clarify error messages --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-08-20Revert "Fetch slang-llvm.so from correct release (#4847)" (#4893)Yong He
This reverts commit 579d59c761cb0460701e0e820eb066275fe357b3.
2024-08-20Proposal: A simpler and more flexible `IDifferentiable` system (#4865)Sai Praveen Bangaru
Designed to work for both value types as well as ref/ptr/buffer types Co-authored-by: Yong He <yonghe@outlook.com>
2024-08-20Fetch slang-llvm.so from correct release (#4847)Ellie Hermaszewska
* Fetch slang-llvm.so from correct release Closes https://github.com/shader-slang/slang/issues/4648 Should close https://github.com/shader-slang/slang/issues/4812 * Update docs * Correct documentation on cmake option * Neaten cmake script * Fix fetching on windows --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-08-19Tuple swizzling, concat, comparison and `countof`. (#4856)Yong He
* Tuple swizzling and element access. * Update proposal status. * Cleanup. * Fix merrge error. * Address review.
2024-08-18Variadic Generics Part 2: IR lowering and specialization. (#4849)Yong He
* Variadic Generics Part 2: IR lowering and specialization. * Update design doc status. * Update design doc. * Resolve review comments.
2024-08-16Design proposal: IFunc interface. (#4851)Yong He
* Design proposal: IFunc interface. * fix code error.
2024-08-16Update documentation for #include to indicate it is for legacy code and new ↵Ellie Hermaszewska
code should use modules (#4862) Closes https://github.com/shader-slang/slang/issues/4281
2024-08-14Design proposal for Tuple types. (#4848)Yong He
* Design proposal for Tuple types. * formatting.
2024-08-14Variadic Generics Part 1: parsing and type checking. (#4833)Yong He
2024-08-14Design proposal for variadic generics (#4821)Yong He
* Design proposal for variadic generics * Update IR lowering section. * fix typo. * Fix error. * Fix typos. * fix typos. * typo fix. * update reviewers. * update implementation info. * update implementation info. * update pr link. * rewording. * more rewording. * grammar fix.
2024-07-26Allow passing sized array to unsized array parameter. (#4744)Yong He
2024-07-25Add a proposal for new AST/IR serialization (#4684)Theresa Foley
This is intended to be a starting-point proposal/RFC document that will be discussed and iterated on to arrive at a POR that we can then use to create multiple bite-sized issues from. Co-authored-by: Yong He <yonghe@outlook.com>
2024-07-23Add Metal to user-guide/09-targets.md (#4703)Jay Kwak
* Add Metal to user-guide/09-targets.md Partially resolves #4262 The description of "Parameter passing" part for Metal is related to PR #4022
2024-07-19Update COM support doc to reflect implemented status (#4682)Shannon Woods
Co-authored-by: Yong He <yonghe@outlook.com>
2024-07-17Fix latex rendering errors in auto-diff docs (#4668)Sai Praveen Bangaru
* Fix latex renderer errors in auto-diff docs Adjusted latex expressions to suit Github's quirky markdown system Fixes #4381 * Update basics.md
2024-07-15Move if_let syntax to convenience-features section (#4628)kaizhangNV
* Move if_let syntax to convenience-features section * Fix the syntax for setting up an anchor * update the comment on sample code * Add example for if_let syntax * Address the comments
2024-07-11Fix incorrect codegen when returning initializer list as existential value. ↵Yong He
(#4618) * Add `dev` cmake preset. * Fix incorrect codegen when returning initializer list as existential value. * Fix cmake. * Fixup.
2024-07-10Specialize address space during spirv legalization. (#4600)Yong He
* Specialize address space during spirv legalization. * Fix. * Fix building doc. * Fix cmake. * Update assert.
2024-07-10Add reflection API for functions. (#4587)Yong He
* Add reflection API for functions. This change adds `SlangFunctionReflection` type in the reflection API that provides methods for querying function result type, parameters and user-defined attributes. `ProgramLayout::findFunctionByName` can now find a function with the given name and returns a `FunctionReflection`. `IEntryPoint` now has a `getFunctionReflection` method that returns an `FunctionReflection` for the entrypoint. * More modifiers; make reflection API consistent.
2024-07-10Add user guide section on user-defined attributes. (#4557)Yong He
* Add user guide section on user-defined attributes. * Update toc
2024-07-10WIP Drop Premake (#3703)Ellie Hermaszewska
* Remove premake lua * Remove premake generated vs project * remove deps file * Remove premake driving bat files * Full test matrix under CMake * Remove premake based ci workflows * Wiggle CI * remove cmake from ci name * find frameworks correctly on osx * remove cmake from ci name * Cope with sccache not being available * cmake based falcor tests * ci wobble * only install ninja if necessary * more appropriate cache name * Remove premake from build instructions * Add some docs on ci setup * remove premake from regression tests * remove premake from perf test * Set SLANGC_PATH * ci wobble * bump slang-binaries * ci wobble * Bump spirv tools * dont use timestamp in cache * remote debug code * cache key wobble * Install sccache after building llvm * Do not build llvm tools * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * Tests spirv via glsl in ci * Define SLANG_ENABLE_XLIB=1 * osx builds on aarch64 * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * ci wobble * package documentation and metadata with cmake * ci wobble * Split hlsl double intrinsic tests * ci wobble * Correct type for double log10 Fixes https://github.com/shader-slang/slang/issues/4549 * remove working test from expected failures * add broken test to expected failures * smaller build for falcor tests * ci wobble * A few exclusions in ci * wip, release script * Enable examples in ci * neaten release script * Correct building docs * Only use xlib vulkan when slang_enable_xlib is true * bump slang-llvm version * Remove toolchain file use * Bump slang-llvm preset version * slash direction * Improve build directions * Add msvc cross build documentation * Disable old release files * Smaller set of releases for test * Allow not building llvm * simplify release matrix * Cross releases * formatting * formatting * ci wiggle * ci wiggle * cleaner * neaten * ci wobble * formatting * Install cross tools on linux * do not clean build dir * neaten ci * neaten ci * neaten ci * remove unused release workflow files * Build llvm on some platforms * neaten ci * notarize on osx * s/x64/x86_64 * ci wobble * Embed stdlib for release build * wobble ci * wobble ci * s/x64/x86_64 * ci wobble * ci wobble * ci wobble * vk-gl-cts on cmake * neaten ci * neaten ci * bump cache action version * Cope with windows being weird about case * old glibc version * old glibc version * Correct action file * Keep cache hot on main branch * separate small script for old glibc releases * ci wobble * ci wobble * Run cmake outside of docker * only sign on releases * Revert "Run cmake outside of docker" This reverts commit a58aaba939a4aa35fe70962fd60d9512b143592f. * python3 on build image * less parallel * ci wobble * ci wobble * ci wobble * newer git * ci wobble * ci wobble * Use newer docker image * Use newer docker image * sccache wobble * permissions issue * neaten * build llvm in ci * build llvm in ci * Remove linux clang build in ci * Only install crossbuild tools on non-aarch64 systems * neaten ci.yml * Correct github matrix * Simplify github matrix * ci wobble * Disable broken test See https://github.com/shader-slang/slang/issues/4589 * ci wobble * Neater slang-llvm archive filename * Neater path for uploading artifacts * Neater ci names * Use Windows SDK 10.0.19041.0 in cmake builds
2024-07-09Add documentation of the type system and decorations (#4470)Sai Praveen Bangaru
2024-07-01 Add clearer information about how to submit a proposal document. (#4514)Shannon Woods
Bug: 4511 Author: Shannon Woods
2024-06-28Adding a note about the keyword, class. (#4503)Jay Kwak
Closes #4448
2024-06-27Update the coding convention document. (#4498)Jay Kwak
Put space between control-flow and `(`. This is a default formatting setting of Visual Studio 2019 and 2022. And we have been writing the code in this style for a while.
2024-06-12Capability System: Implicit capability upgrade warning/error (#4241)ArielG-NV
* capability upgrade warning/error adjusted implementation + tests to support a warning/error if capabilities are implicitly upgraded and test accordingly. * add glsl profile caps * add GLSL and HLSL capabilities to the associated capability * syntax error in capdef * only error if user explicitly enables capabilities 1. changed testing infrastructure to not set a `profile` explicitly, 2. Added tests to be sure this works as intended with user API and with slangc command line * Change capability atom definitions and how Slang manages them to fix errors 1. most `glsl_spirv` version atoms have been removed from `.capdef`, instead we will translate `spirv` version atoms into `glsl_spirv` since there is no point in writing the same code twice in `.capdef` files to define `spirv` versions. 2. add spirv version, and hlsl sm version (and equivlent) capability dependencies 3. removed some stage requirments which were set on objects, keep the wrapper capabilities. I am keeping the wrapper capabilities since I am unaware on if there are stage limitations (spec says code in practice does not work). * check internal version instead of version profile (_spirv_1_5 vs. spirv_1_5) * remove unused OpCapability. adjust SPIRV version'ing again for glsl_spirv * apply workaround for glslang bug with rayquery usage * ensure capabilities targetted by a profile and added together by a user are valid * remove additions to `spirv_1_*` wrapper * spirv_* -> glsl_spirv fix * fix bug where incompatable profiles would cause invalid target caps * try to avoid joining invalid capabilities * fix the warning/error & printing * run through tests to fix capability system and test mistakes many mistakes were mesh shaders doing `-profile glsl_450+spirv_1_4`. This is not allowed for a few reasons 1. the test tooling does not handle arguments the same as `slangc` 2. glsl_450 core profile does not support mesh shaders, nor does spirv_1_4. sm_6_5 does work in this senario * set some sm_4_1 intrinsics to sm_4_0 * replace `GLSL_` defs with `glsl_` * swap the unsupported render-test syntax for working syntax * set d3d11/d3d12 profile defaults this is required since sm version changes compiled code & behavior * adjusted nvapi capabilities with atomics + d3d11 set to use sm_5_0 as per default * cleanup * address review * incorrect styling * change `bitscanForward` to work as intended on 32 bit targets --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-06-12Add option to preserve shader parameter declaration in output SPIRV. (#4344)Yong He
* Add option to preserve shader parameter declarations in output. * Add test.
2024-06-10Fix typos in the docs (#4322)Anders Leino
2024-06-08Add initial draft auto-diff basics and IR overview documents (#4216)Sai Praveen Bangaru
2024-06-07Improve documentation and example formatting consistency (#4299)Matthew Moulton
* Improve doc and example consistency Improve consistency of formatting in example shaders and remove trailing spaces in documentation files. Fix minor typos.
2024-06-06Typo in 06-interfaces-generics.md (#4284)Elie Michel
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
2024-06-06Fix python syntax highlighting in slangpy chapter (#4282)Elie Michel
2024-05-31Capabilities generator inclusive join and misc (#4237)ArielG-NV
2024-05-30Various issues in code snippets (#4247)Elie Michel
Fixed as I was testing release `v2024.1.17` (latest) Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
2024-05-30Update document regarding pointer (#4248)Jay Kwak
And also add an actual test case from the User Guide example.
2024-05-30Fix confusion in Translation Units doc (#4245)Elie Michel
I think the sentence was saying the opposite of what it meant! Co-authored-by: Yong He <yonghe@outlook.com>
2024-05-30Fix small typo (#4246)Elie Michel
2024-05-24Fix pointer example (#4224)cheneym2
* Fix pointer example Make the example shown for pointers something that would compile. Don't redefine pNext and do define MyType. * Fix formatting of struct in pointer example
2024-05-23Fix pointers link in userguide (#4217)cheneym2
Adding (limited) to the header in a previous doc change broke the link. Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
2024-05-16Update 03-convenience-features.md (#4179)ArielG-NV
add member init expr and constructor logic to the docs
2024-05-09fix typo (#4144)Tomáš Pazdiora
Co-authored-by: Yong He <yonghe@outlook.com>
2024-05-08`slangc` tool experience improvements. (#4140)Yong He
* `slangc` tool experience improvements. Fixes #4123. Fixes #4127. * Update doc.
2024-05-02Slang: update pointer related documentation (#4088)cheneym2
Slang does have some support for pointers. Remove an outdated comment stating the contratry, and update the section that describes pointer support to also list some relevant limitations. Fixes #3970 Co-authored-by: Yong He <yonghe@outlook.com>
2024-04-25Support derivative functions in compute & capabilities adjustments (#4014)ArielG-NV
* Support derivative functions in compute & capabilities adjustments fixes #4000 PR implements derivative functions in compute shaders properly so we have the functionality for SPIR-V & GLSL. Tests reflect fragment and compute paths. PR also adjusts capabilities to correct wrong SPRI-V target capabilities for when using textures. Remarks: 1. __requireComputeDerivative(); is a intrinsic_op and not modifier since inlining will destroy the modifier. 2. Derivative mode is tied to an entry point decoration `[DerivativeGroupQuad]`/`[DerivativeGroupLinear]` or GLSL syntax ``derivative_group_linearNV`. Default is to set the mode to `[DerivativeGroupQuad]` * remove -emit-spirv-directly * fixes 1. fix minor issue fwidth change where I returned the wrong type 2. fix issue where glslang{glsl->spirv} is wrong, so we don't run that test and just run the glsl test & direct spir-v test for intrinsic-texture.slang * adjust as per review and refine code 1. add test to ensure multi-diverging-in-logic entry points work -- 2 functions which may cause computeDerivatives + 1 that uses, 1 that does not. 2. naming 3. use entry point ref graph for c-like-targets 4. reordered some code to util's and removed `static linline` since that was just for ease of coding on my end (should not have been pushed). * Grammer * split up source file + issolate GLSL emit path change. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-04-17Implement if(let ...) syntax (#3673) (#3958)kaizhangNV
2024-04-16Fix Slang documentation typos (#3961)cheneym2
2024-04-13Documentation: fix typos and grammar (#3945)bprb