sort by:
Revision Author Date Message Commit Date
5a3aa61 Split render-d3d12.h/cpp into a set of smaller files (#2231) * Split render-d3d12 into numerous smaller files to make the code easier to parse * Added all new D3D12 files created from splitting render-d3d12 * Fixed several uses of attachment still floating around; Changed resource-d3d12 and descriptor-heap-d3d12 to match naming conventions of new d3d12 implementation header files * Readded files with name changes because changing them from inside VS apparently results in them being treated as new files * Merged in externals changes from master * Small cleanup changes * Rerun CI Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 17 May 2022, 17:56:14 UTC
716e75b Special handling around return and liveness (#2234) * #include an absolute path didn't work - because paths were taken to always be relative. * Refactor Liveness pass, such that locations can be found independently of setting up ranges. * Refactor around different stages of liveness span analysis. * WIP Take into account PHI temporaries in liveness tracking. * WIP First pass of PHI liveness refactor. * Add BlockIndex. * WIP Refactor phi liveness around inst runs. * More improvements around liveness tracking. * Bug fixes. Special handling to not add multiple ends, at starts of blocks and after accesses. * Fix test output. * Use IRInsertLoc to track insertion point. * Liveness markers don't have side effects. * Fix typo in liveness test. * Small improvements around setting SuccessorResult. * Fix memory issue around reallocation and RAIIStackArray. Update test output. * Update test output for liveness.slang. * Fix typo in SuccessorResult blockIndex. * Small tidy up. * Handle the root start block, correctly scoping the run. * Split BlockInfo into 'Root' and 'Function'. Store successors as BlockIndices. * Tidy up around liveness tracking. * Add head/tail support to ArrayViews. Use Count where appropriate. Use head/tail in liveness impl. * Special handling if return is effectively a live variable. * Update test output for improved return handling. * Refactor how handling of return accesses. Fix issue around liveness starts. * Disable release warning for unused method. * Some small improvements around liveness pass. 17 May 2022, 17:39:01 UTC
90c123a Liveness tracking with phis (#2233) * #include an absolute path didn't work - because paths were taken to always be relative. * Refactor Liveness pass, such that locations can be found independently of setting up ranges. * Refactor around different stages of liveness span analysis. * WIP Take into account PHI temporaries in liveness tracking. * WIP First pass of PHI liveness refactor. * Add BlockIndex. * WIP Refactor phi liveness around inst runs. * More improvements around liveness tracking. * Bug fixes. Special handling to not add multiple ends, at starts of blocks and after accesses. * Fix test output. * Use IRInsertLoc to track insertion point. * Liveness markers don't have side effects. * Fix typo in liveness test. * Small improvements around setting SuccessorResult. * Fix memory issue around reallocation and RAIIStackArray. Update test output. * Update test output for liveness.slang. * Fix typo in SuccessorResult blockIndex. * Small tidy up. * Handle the root start block, correctly scoping the run. * Split BlockInfo into 'Root' and 'Function'. Store successors as BlockIndices. * Tidy up around liveness tracking. * Add head/tail support to ArrayViews. Use Count where appropriate. Use head/tail in liveness impl. 17 May 2022, 17:12:59 UTC
2b350a5 Upgrade to glslang 11.9.0 binaries (#2240) * #include an absolute path didn't work - because paths were taken to always be relative. * Update slang binaries to have glslang 11.9.0 17 May 2022, 14:02:32 UTC
750e512 Update SPIR-V generated (#2238) * #include an absolute path didn't work - because paths were taken to always be relative. * Update spirv-tools-generated, for glslang-upgrade-14f6e27. 16 May 2022, 21:06:55 UTC
834c9b9 Fix typo in docs. (#2237) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix typo in docs. 16 May 2022, 19:34:18 UTC
21c3cc8 Fixed the false successful compile result when the FXC downstream compiler is called with invalid arguments, such as unsupported profile. (#2235) 16 May 2022, 13:57:49 UTC
765061a Initial support for COM interface in host code. (#2230) Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 11 May 2022, 02:42:48 UTC
dc541cc Add design proposal for basic interfaces. (#2229) This change adds a `docs/proposals/` directory to give us a place to iterate on proposals for language/compiler features that are a bit too large to handle as issues. The first proposal I'm checking in here is a sketch of what our built-in numeric interfaces might want to look like. I do not propose that the design in the document is perfect or even *finished*. The goal here is to get things checked into source control to foster subsequent discussion and iteration. 10 May 2022, 23:45:07 UTC
2eff11b Glslang upgrade (#2228) * #include an absolute path didn't work - because paths were taken to always be relative. * Update SPIR-V headers/opt. Update glslang. * Set the SPIR-V emit version. * Use the merged hash from shader-slang/glslang * Improve comment around spirv version for emitting spir-v directly. 10 May 2022, 23:44:43 UTC
8a02d13 Add support for `spirv_literal` (#2227) * #include an absolute path didn't work - because paths were taken to always be relative. * Add SPIRVLiteralType, to mark types that have spirv_literal in function parameter output. * Update test result. Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 10 May 2022, 17:05:18 UTC
8c540f2 Use IR pass to eliminate phi nodes (#2226) * Use IR pass to eliminate phi nodes "Phi nodes" are one of the key contrivances that makes SSA (Static Single Assignment) form work. Because SSA is so great for compiler IRs, we kind of need to deal with phi nodes, but they also get in the way because they don't have a direct analog in most lower-level machine ISAs or execution models, nor in most of the high-level languages a transpiler wants to emit. As a result a compiler like ours needs to be able to eliminate the phi nodes from a program as part of generating output code. (For any clever people noting that SPIR-V supports phi nodes directly: yes, it does. It doesn't need to and it probably *shouldn't*. Anybody involved in the decision-making knows my reasoning, and anybody else should feel free to ask me if they want the lecture. Anyway...) The basic idea of elimiating phi nodes is simple enough. We replace each phi node with a temporary variable. Uses of the phi use values loaded from the temporary. The operation of the phi itself (assigning a value based on the branch taken) amounts to an assignment into the temporary. Previously, the Slang compiler dealt with phi nodes very late in the process of generating code: in the middle of emitting strings of source code in a high-level language like HLSL or GLSL. Doing the work that late in compilation has two big drawbacks: 1. Our ability to emit clean and/or optimal code is limited because we may not be able to make certain changes to the IR, or because we cannot make use of additional information like a dominator tree that might be available at other points in compilation. 2. Any other IR passes that relate to temporary variables won't be able to see the variables that we generate for phi nodes. This could raise issues with correctness (e.g., if we want to compute live-range information for *all* temporary variables), or performance (we have no way to run additional IR optimization passes after phis are eliminated). This change addresses these problems by making the elimination of phi nodes an explicit IR pass. Additional optimizations can easily be run after this pass (although we'd need to be careful not to run passes that could end up introducing new phis). The pass makes use of the information available to it to try to produce code that will emit to "clean" HLSL/GLSL. The core of the pass is in `slang-ir-eliminate-phis.cpp`, and is heavily commented, so I won't describe the approach in detail here. There are two related issues that came up, though: First, it turned out that our emit logic for local variables (`IRVar` instructions) wasn't using the function we'd defined named `emitVar()`. One worrying consequence of that oversight was that the `precise` modifier would impact generated HLSL/GLSL for variables that turned into SSA values (including phi nodes), but *not* for local variables that had not been SSA'd (or that had been SSA'd and then de-SSA'd). This change also fixes that bug; it is unclear how widespread the impact of the original issue might be. Second, generating explicit IR temporaries for phi nodes exposed a pre-existing bug in the `slang-ir-restructure-scoping` pass. That pass basically detects cases where we have an instruction `I` with a use `U` such that the use follows the rules of SSA form ("def dominates use," meaning `I` dominations `U`), but does not follow the more restrictive scoping rules of high-level-language output (where a value computed "inside" a loop is not automatically visible to code outside the loop just because it dominates that code). That pass did not correctly account for the case where `I` was a temporary variable. It seems that case could not arise before now because we didn't have any passes that would move `var`, `load`, or `store` operations out of the basic block they started in. The fix for that pass was relatively simple, and will make the whole thing more robust in case we add more aggressive optimizations later. * fixup: expected test output 10 May 2022, 14:18:03 UTC
7a9bc08 Liveness pass fixes and improvements (#2225) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix for loops within dominator tree. Fix for functions that have no body. * Use a count array. Update some comments. * Special case handling of the root block, for searching for last access. * Enable liveness test with glsl output. Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 09 May 2022, 17:45:36 UTC
117f5e5 Initial work around groupshared (#2224) * #include an absolute path didn't work - because paths were taken to always be relative. * Allow rate modifier on parameter. * Add test. * Disable test for now as breaks on source comparison because around nvAPI. 06 May 2022, 20:35:15 UTC
b915ae6 Support for HLSL `export` (#2223) * #include an absolute path didn't work - because paths were taken to always be relative. * Add support for HLSL `export`. * Test for using `export` keyword. 05 May 2022, 19:53:29 UTC
3088d90 Various vulkan/glsl fixes. (#2222) * Various vulkan/glsl fixes. * Fix. * Fix. * Canonicalize type constraints for name mangling. Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 05 May 2022, 17:48:14 UTC
aa03cea Output SPIR-V lifetimes (#2221) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP tracking liveness. * Skeleton around adding liveness instructions. * Calling into liveness tracking logic. Adds live start to var insts. * Liveness macros have initial output. * Looking at different initialization scenarios. * Some discussion around liveness. * WIP for working out liveness end. * WIP Updated liveness using use lists. * Is now adding liveness information * Some small fixes. * WIP around liveness. * Seems to output liveness correctly for current scenario. * Tidy up liveness code. * Update comment arounds liveness to current status. * Small fixes to liveness test. * Add support for call in liveness analysis. * Improve liveness example with array access. * Small updates to comments. * Disable liveness test because inconsistencies with output on CI system. * First pass support for GLSL SPIR-V liveness support. * Add the SPIRVOpDecoration. * Fix signature for OpLivenessStop. * Simplified by having a Kind type. * Fix some issues brought up in PR. * Rename liveness instructions. * Merge with var-lifetime. Small improvements. * Improvements to the documentation/naming in GLSL liveness pass. Add comment around possible improvements to the liveness pass. 05 May 2022, 16:30:10 UTC
e3e0132 Preliminary Liveness tracking (#2218) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP tracking liveness. * Skeleton around adding liveness instructions. * Calling into liveness tracking logic. Adds live start to var insts. * Liveness macros have initial output. * Looking at different initialization scenarios. * Some discussion around liveness. * WIP for working out liveness end. * WIP Updated liveness using use lists. * Is now adding liveness information * Some small fixes. * WIP around liveness. * Seems to output liveness correctly for current scenario. * Tidy up liveness code. * Update comment arounds liveness to current status. * Small fixes to liveness test. * Add support for call in liveness analysis. * Improve liveness example with array access. * Small updates to comments. * Disable liveness test because inconsistencies with output on CI system. * Fix some issues brought up in PR. * Rename liveness instructions. 05 May 2022, 13:09:25 UTC
ef314f1 Enable building for aarch64 on MacOS (#2219) Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com> 04 May 2022, 23:13:35 UTC
b9c1126 Turn off warnings-as-errors for gfx (#2220) Other than on Windows, we will go ahead and turn off warnings-as-errors for the gfx project, to help clean up some of our CI build mess. 04 May 2022, 22:04:32 UTC
ca86ce2 Changed all uses of attachment (in the context of render/depth stencil targets) to target (#2214) Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 04 May 2022, 18:44:24 UTC
f4c2b0d Fix errors when building with the latest Xcode (#2215) * Fix errors when building with the latest Xcode * Bring back unused variable to better match comments Co-authored-by: jsmall-nvidia <jsmall@nvidia.com> 28 April 2022, 15:37:58 UTC
80ea76a Fix the way IR "regions" store conditions (#2216) As part of generating high-level-language code, we have a pass that builds a data structure representing structured control-flow `Region`s and their nesting relationship. That data structure is then used when emitting control-flow statements for the body of a function. There are `Region` subtypes coresponding to different kinds of control flow constructs. Both the `IfElseRegion` and `SwitchRegion` subtypes were implemented to store a reference to the branch condition direclty in the `Region`. This turns out to be the root cause of the problem. After the nested `Region` structure is constructed, we have an IR pass that uses the region hierarchy to detect and fix problems where the implicit "scoping" rules of SSA form are incompatible with the scoping rules that will be in effect when those regions are emitted as high-level-language control-flow statements. A bug arose when one of the SSA values that required the scoping fix was the branch condition of an `if` statement. While the IR pass did what it was supposed to and replaced the operand to the `IRIfElse` instruction, doing so did not change the cached condition in the corresponding `IfElseRegion`, and thus didn't effect the way code got emitted for the `if(...)` condition in HLSL. The fix here is simple: the relevant `Region` subtypes now store a pointer to the relevant control-flow instruction rather than to the branch condition. The emit logic can thus fetch the correct condition from the control-flow instruction at the time it emits an `if` or `switch`. Note: We do not need to have the same worries around the `IRIfElse` or `IRSwitch` instructions, nor for the `IRBlock`s that the `Region`s still store. The passes that come after the `Region`s get created are not supposed to alter the CFG in any way, because otherwise they would risk changing/invalidating the `Region` structure. Similarly, this change doesn't modify the `IRInst`s refernced in the `Case`s for a `SwitchRegion` under the assumption that these must always be literal integer constants, and thus cannot be changed out. Co-authored-by: jsmall-nvidia <jsmall@nvidia.com> 28 April 2022, 14:27:12 UTC
1f3298e Disable `class` keyword to define a new type (#2212) * #include an absolute path didn't work - because paths were taken to always be relative. * Disable class keyword. * Add class keyword test. * Fix test diagnostic. 28 April 2022, 12:52:49 UTC
634f541 Make artifact an interface (#2195) * #include an absolute path didn't work - because paths were taken to always be relative. * Compile to a dxil library. * Added CompileProduct. * Support handling of ModuleLibrary. * CacheBehavior -> Cache * Use CompileProduct for -r references. * CompileProduct -> Artifact. * Determining an artifact type on binding. * Determine binary linkability. * Added Artifact::exists. * Added ArtifactKeep. * Small fixes. * Small improvements to Artifact. * Add zip extension. * Fix some comments. * Fix multiple adding of PublicDecoration. Make public output export for DXIL/lib. Add checking for simpleDecorations such that only added once. * Use 'whole program' to identify library build. * Move slang-artifact into compiler-core. * Split out Keep free functions. * Artifact::Keep -> ArtifactKeep. * Handle libraries as artifacts. * Add -target dxil so test infrastructure knows it needs DXC. * Linking working in DXC. * Improve handling around emit for 'export'. * Add comment around Artifact name. * Render test working with linking. * Improvements around Artifact handling. * Add ArtifactPayloadInfo. * Small tidy up around artifact. * Split out code to get info about Artifacts into artifact-info.cpp/.h * IArtifact interface and IArtifactInstance interface. * Fix small issues. * Fix compilation warning issue. * Fix missing SLANG_OVERRIDE. * Small fixes to make compilation work on Visual Studio 2022. * Small improvements to Artifact interface/naming. * Added Desc with each element in IArchive to allow more flexibility in usage. * Fix clang warning issue. * Add ArtifactPayload::Diagnostics * More discussion around IArtifact usage. * Re-add slang-artifact.h which was removed during merge. * Fix typo identified in review. 27 April 2022, 21:53:21 UTC
ec530b3 gfx: Add interop API to control descriptor heap binding. (#2211) Co-authored-by: Yong He <yhe@nvidia.com> 27 April 2022, 20:58:55 UTC
50d5a10 Split out Artifact info (#2193) * #include an absolute path didn't work - because paths were taken to always be relative. * Compile to a dxil library. * Added CompileProduct. * Support handling of ModuleLibrary. * CacheBehavior -> Cache * Use CompileProduct for -r references. * CompileProduct -> Artifact. * Determining an artifact type on binding. * Determine binary linkability. * Added Artifact::exists. * Added ArtifactKeep. * Small fixes. * Small improvements to Artifact. * Add zip extension. * Fix some comments. * Fix multiple adding of PublicDecoration. Make public output export for DXIL/lib. Add checking for simpleDecorations such that only added once. * Use 'whole program' to identify library build. * Move slang-artifact into compiler-core. * Split out Keep free functions. * Artifact::Keep -> ArtifactKeep. * Handle libraries as artifacts. * Add -target dxil so test infrastructure knows it needs DXC. * Linking working in DXC. * Improve handling around emit for 'export'. * Add comment around Artifact name. * Render test working with linking. * Improvements around Artifact handling. * Add ArtifactPayloadInfo. * Small tidy up around artifact. * Split out code to get info about Artifacts into artifact-info.cpp/.h * Re-add slang-artifact.cpp * Readd artifact.cpp. 27 April 2022, 17:51:30 UTC
f943246 Improvements around Artifacts (#2192) * #include an absolute path didn't work - because paths were taken to always be relative. * Compile to a dxil library. * Added CompileProduct. * Support handling of ModuleLibrary. * CacheBehavior -> Cache * Use CompileProduct for -r references. * CompileProduct -> Artifact. * Determining an artifact type on binding. * Determine binary linkability. * Added Artifact::exists. * Added ArtifactKeep. * Small fixes. * Small improvements to Artifact. * Add zip extension. * Fix some comments. * Fix multiple adding of PublicDecoration. Make public output export for DXIL/lib. Add checking for simpleDecorations such that only added once. * Use 'whole program' to identify library build. * Move slang-artifact into compiler-core. * Split out Keep free functions. * Artifact::Keep -> ArtifactKeep. * Handle libraries as artifacts. * Add -target dxil so test infrastructure knows it needs DXC. * Linking working in DXC. * Improve handling around emit for 'export'. * Add comment around Artifact name. * Render test working with linking. * Improvements around Artifact handling. 26 April 2022, 16:43:28 UTC
79dd12c Linking in DXC (#2190) * #include an absolute path didn't work - because paths were taken to always be relative. * Compile to a dxil library. * Added CompileProduct. * Support handling of ModuleLibrary. * CacheBehavior -> Cache * Use CompileProduct for -r references. * CompileProduct -> Artifact. * Determining an artifact type on binding. * Determine binary linkability. * Added Artifact::exists. * Added ArtifactKeep. * Small fixes. * Small improvements to Artifact. * Add zip extension. * Fix some comments. * Fix multiple adding of PublicDecoration. Make public output export for DXIL/lib. Add checking for simpleDecorations such that only added once. * Use 'whole program' to identify library build. * Move slang-artifact into compiler-core. * Split out Keep free functions. * Artifact::Keep -> ArtifactKeep. * Handle libraries as artifacts. * Add -target dxil so test infrastructure knows it needs DXC. * Linking working in DXC. * Improve handling around emit for 'export'. * Add comment around Artifact name. * Render test working with linking. Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 26 April 2022, 16:09:32 UTC
66ad007 Overloaded name lookup fix (#2199) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix for overloaded name lookup. * Small improvements. 26 April 2022, 14:10:17 UTC
b69b0e4 Fixed the implementation of RayQuery flags passed through the generic parameter on GLSL. (#2207) Improved the trace-ray-inline test to check that the flag is not ignored anymore. 25 April 2022, 22:43:39 UTC
bec92dd README: fix url of the linux build badge, and add the macOS build badge (#2204) * README: fix url of the linux build badge * README: add macOS build badge 25 April 2022, 17:59:12 UTC
3572f7f Treat warnings as errors in slang-gfx (#2201) * Enable treating warnings as errors * Changed tab to spaces 22 April 2022, 00:05:05 UTC
f493d24 GFX renaming work part 2: slang-gfx.h renames (#2194) * Fixed all build errors and type conversion warnings from renames in slang-gfx.h * Made necessary build fixes to the CUDA implementation * Renamed ITextureResource::Size to ITextureResource::Extents * More rename changes based on CI errors * More renames to fix CI build errors * Rerun tests 21 April 2022, 19:59:09 UTC
1b6cea2 Made translation units visible to transitive `import`s. (#2197) 21 April 2022, 18:03:30 UTC
3638e77 `export` support in HLSL (#2188) * #include an absolute path didn't work - because paths were taken to always be relative. * Compile to a dxil library. * Added CompileProduct. * Support handling of ModuleLibrary. * CacheBehavior -> Cache * Use CompileProduct for -r references. * CompileProduct -> Artifact. * Determining an artifact type on binding. * Determine binary linkability. * Added Artifact::exists. * Added ArtifactKeep. * Small fixes. * Small improvements to Artifact. * Add zip extension. * Fix some comments. * Fix multiple adding of PublicDecoration. Make public output export for DXIL/lib. Add checking for simpleDecorations such that only added once. * Use 'whole program' to identify library build. * Add -target dxil so test infrastructure knows it needs DXC. 21 April 2022, 17:47:18 UTC
34f8b5e Example for compiler crash with recursive function calling (#2196) * #include an absolute path didn't work - because paths were taken to always be relative. * Add crash when lowering a recursive function. * Add simplified recursive crash example. * Fix typos/tabs. 21 April 2022, 14:06:55 UTC
3d1d692 Make translation units in the same CompileReq visible to `import`. (#2184) * Make translation unitts in the same CompileReq visible to `import`. * Fix code review comments. Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 19 April 2022, 19:09:22 UTC
d939773 DXIL library support and Artifact type (#2186) * #include an absolute path didn't work - because paths were taken to always be relative. * Compile to a dxil library. * Added CompileProduct. * Support handling of ModuleLibrary. * CacheBehavior -> Cache * Use CompileProduct for -r references. * CompileProduct -> Artifact. * Determining an artifact type on binding. * Determine binary linkability. * Added Artifact::exists. * Added ArtifactKeep. * Small fixes. * Small improvements to Artifact. * Add zip extension. * Fix some comments. 15 April 2022, 19:46:45 UTC
ac81614 GFX renaming work part 1 (#2183) * Added new typedefs for Size, Offset, Count, and Index; Replaced numerous instances of size_t in slang-gfx.h, render-d3d12, render-vk, and renderer-shared with either Size or Offset; Fixed compiler warnings for mismatched numerical types * Renamed Index and Count to GfxIndex and GfxCount, changed to 32 bit from 64 bit 14 April 2022, 17:00:35 UTC
5ffd304 Callable shader fix and explicit payload locations for GLSL (#2185) * Fixed the callable shader payload type for GLSL. * Added location parameters to the __vulkanRayPayload and __vulkanCallablePayload attributes. The default value is -1 which means use the old auto-assignment logic. * Fixed the vkray/callable-caller test. 13 April 2022, 21:24:58 UTC
c949d50 Small doc improvement around 8/16 bit types. (#2180) * #include an absolute path didn't work - because paths were taken to always be relative. * Added information of 8 and 16 bit types. * Link to target compatibility. * Updated 8-bit support added via #2182 13 April 2022, 00:56:05 UTC
65c2e7f Support `[DllImport]` (#2181) * Support `[DllImport]` * Fix. * Fix. * Fix array type emit in cpp. * Fix. * Fix. * Fix Co-authored-by: Yong He <yhe@nvidia.com> 12 April 2022, 22:23:53 UTC
89560d6 Added GLSL extensions for 8-bit types (int8_t, uint8_t) (#2182) 11 April 2022, 21:43:25 UTC
1409a53 Refactor: eliminate BackEndCompileRequest (#2178) An earlier refactoring pass over the compiler codebase split the type that had been called `CompileRequest` into three distinct pieces: * `FrontEndCompileRequest` which was supposed to own state and options related to running the compiler front end and producing IR + reflection (e.g., what translation units and source files/strings are included). * `BackEndCompileRequest` which was supposed to own state and options related to running the compiler back end to translate the IR for a `ComponentType` (program) into output code. (Note that the `BackEndCompileRequest` was conceived of as orthogonal to the `TargetRequest`s, which store per-target and target-specific options.) * `EndToEndCompileRequest` which was an umbrella object that owns separate front-end and back-end requests, plus any state that is only relevant when doing a true end-to-end compile (such as the kinds of compiles initiated with `slangc`). As originally conceived, the only state that this type was supposed to own was stuff related to "pass-through" compilation, as well as state related to writing of generated code to output files. That refactoring work was very useful at the time, because it allowed us to "scrub" the back end compilation steps to remove all dependencies on front-end and AST state (this was important for our goals of enabling linking and codegen from serialized Slang IR). At this point, however, it is clear that the hierarchy that was built up serves very little purpose: * The `BackEndCompileRequest` type is only used in two places: * As part of an `EndToEndCompileRequest`, where the settings on the `BackEndCompileRequest` can be configured, but only through the `EndToEndCompileRequest` * As part of on-demand code generation through the `IComponentType` APIs. In this case, the settings stored on the `BackEndCompileRequest` are not accessible to the application at all, and will always use their default values, so that instantiating a "request" object doesn't really make any sense. * The `FrontEndCompileRequest` type has a similar situation: * Front-end compilation as part of an `EndToEndCompileRequest` supports user configuration of `FrontEndCompileRequest` settings, but only through the `EndToEndCompileRequest` * Front-end compilation triggered by an `import` or a `loadModule()` call does not support user configuration of settings at all. It will always derive all relevant settings from thsoe on the session ("linkage"). In addition, subsequent changes have been made to the compiler that show a bit of a "code smell" and/or forward-looking worries for this decomposition: * In some cases we've had to add the same setting to multiple types in the breakdown (front-end, back-end, end-to-end, linkage, target, etc.) which makes it harder for us to validate that all the possible mixtures of state work correctly. * Related to the above, in some cases we have manual logic that copies state from one of the objects in the breakdown to another, in order to ensure that the user's intention is actually followed. * As a forward-looking concern, it seems that developers have sometimes added new configuration options and state to places that don't really make sense according to the rationale of the original decomposition (e.g., we probably don't want to have a lot of state that is only available via end-to-end requests, given that the API structure is meant to push users *away* from end-to-end compiles). As a result of all of the above, I've been planning a large refactor with the following big-picture goals: * Eliminate `BackEndCompileRequest` * Move all relevant state/options from the back-end request to the end-to-end request, since that is the only place they could be set anyway. * Introduce a transient "context" type to be used for the duration of code generation that serves the main functions that back-end requests really served in the codebase * Make `EndToEndCompileRequest` be a subclass of `FrontEndCompileRequest` * Consider addding a transient "context" type for front-end compiles that can be used in `import`-like cases rather than needing a full front-end request object. If this works, then eliminate `FrontEndCompileRequest` and be back to world with just a single `CompileRequest` type * Move *all* compiler configuration options to a distinct type (named something like `CompilerConfig` or `CompilerOptions` or whatever) which stores setting as key-value pairs, and has a notion of "inheritance" such that one configuration can extend or build on top of another. Make all the relevant types use this catch-all structure instead of redundantly storing flags in many places. This change deals with the first of those bullets: removeal of `BackEndCompileRequest`. The addition of the `CodeGenContext` type is perhaps an unncessary additional step, but making that change helps clean up a bunch of the code related to per-target code generation, so I think it is the right choice. Co-authored-by: Yong He <yonghe@outlook.com> 11 April 2022, 19:01:31 UTC
2aac370 Texture views/shapes tests part 1 (#2179) * Framework for texture views testing working; Small tweaks to texture testing utils; Changed D3D12 readTextureResource to account for non-1 depth * Basic framework for texture views tests working; Test file needs a rename at some point * 1D, 2D, and 3D textures working for ShaderResource, UnorderedAccess, and RenderTarget tests; Fixed some small issues with handling the depth field of 3D textures in Vulkan causing incorrectly cleared textures 07 April 2022, 18:11:45 UTC
86221ff Fixed the mapping of the ray tracing instance functions to GLSL (#2177) * Fixed the mapping of the *InstanceID() and *InstanceIndex() functions to GLSL. * Fixed and somewhat improved the vkray/closesthit test. 07 April 2022, 02:07:30 UTC
464ecb6 Fix issue with multiple namespace openings (#2176) * #include an absolute path didn't work - because paths were taken to always be relative. * Added sample-grad-clamp-lod sample. * Fix handling multiple reopenings of namespaces. 05 April 2022, 21:53:41 UTC
7f36c34 Handling static const variables in generics (#2171) * #include an absolute path didn't work - because paths were taken to always be relative. * Meta-2 test works. * Add new generic test for static const variable in a function in a generic. * Generic function with static const variable doesn't work. 05 April 2022, 17:32:24 UTC
f58f36e Added sample-grad-clamp-lod test. (#2173) * #include an absolute path didn't work - because paths were taken to always be relative. * Added sample-grad-clamp-lod sample. 05 April 2022, 13:47:52 UTC
2ddd252 Improved type printing (#2172) Improved the type printing function to include the generic substitutions and parent types. Added a test for it, mismatching-types.slang 01 April 2022, 17:56:02 UTC
255fd58 Allow slangc to generate exe from .slang file. (#2170) 29 March 2022, 05:14:33 UTC
79b8108 Separated out new texture-related structures and texture data generation from texture copying tests into a new util file to make them accessible to all gfx unit tests (#2169) 24 March 2022, 17:54:58 UTC
b8617af Fix for default initialization with generic field (#2168) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix for = {} initialization with a field that is generic type parameter. * Handling for if a non type is passed to a generic parameter which requires a type. * Small comment improvements. Fix some tab issues. * This fixes the matrix.slang issue. Move the matrix.slang test into bugs as generic-default-matrix.slang 24 March 2022, 15:42:56 UTC
e1a331a C++ extractor parsing slang.h (#2162) * #include an absolute path didn't work - because paths were taken to always be relative. * Split doc extractor such that can be used in C++ extractor. * Compiles. Update the stdlib docs. * Fix issue on release builds. * Add support for extracting documentation to C++ extractor. * Dump out markup. Make enum value backing type take tokens. * Node::Type -> Node::Kind * More improvements around Node::Type -> Node::Kind * Support for parsing callable types. * Fix issue params for callable, and default value for variable. * Add support for static. * Improve handling parsing of contained types. * Small improvements around template consumption. * Improve dumping with markup/static. * Small improvements around reflection. * Add more flexible handling of markers. Allow reflection without markers. * Handling external "C" unsigned/signed 24 March 2022, 15:12:19 UTC
91292b8 Add additional texture to texture copying tests (#2165) * Working on finding a better way to do result comparisons in order to accommodate testing different formats and texture types, copying small to large texture currently half broken * All tests except copying into a buffer with an offset working with new code for results comparison, support for most formats WIP * Replaced SubresourceStuff with ValidationTextureData; Added implementation for ValidationTextureFormat::initializeTexel() and changed generateTextureData() to call this * All implemented formats work on D3D12, a few broken for Vulkan * Fixed numerous locations in render-vk.cpp to set aspect masks based on either the format or the provided TextureAspect; All tests except copy to buffer with offset working on new code structure * All texture to texture copying tests work for all non-compressed formats; Test code cleaned up to minimize the amount of stuff needing to be passed between functions * All tests working with all texture types except TextureCube and all non-compressed formats; Temporarily removing test for copying to a buffer at an offset, will likely return in a separate test file * Small cleanup changes * build fixes 21 March 2022, 23:56:11 UTC
2e1a84a Fix type truncation during SCCP. (#2163) 18 March 2022, 16:35:23 UTC
42ca675 Add -depfile option to save dependency info (#2161) 16 March 2022, 15:28:01 UTC
8533dd2 C++ extractor callable support (#2159) * #include an absolute path didn't work - because paths were taken to always be relative. * Split doc extractor such that can be used in C++ extractor. * Compiles. Update the stdlib docs. * Fix issue on release builds. * Add support for extracting documentation to C++ extractor. * Dump out markup. Make enum value backing type take tokens. * Node::Type -> Node::Kind * More improvements around Node::Type -> Node::Kind * Support for parsing callable types. * Fix issue params for callable, and default value for variable. * Add support for static. * Improve handling parsing of contained types. * Small improvements around template consumption. * Improve dumping with markup/static. * Small improvements around reflection. * Add more flexible handling of markers. Allow reflection without markers. 15 March 2022, 14:45:24 UTC
06d04ab Small fix in d3d12 transient heap. (#2160) Use `ShortList` instead of `Array` for `m_waitHandles`. Co-authored-by: Yong He <yhe@nvidia.com> 14 March 2022, 18:07:30 UTC
0890fd8 gfx: Add `ITransientResourceHeap::finish()` to avoid `Signal` after every queue submit. (#2158) Co-authored-by: Yong He <yhe@nvidia.com> 11 March 2022, 19:57:53 UTC
f6c2a0f gfx: restructure render-vk.cpp (#2157) Co-authored-by: Yong He <yhe@nvidia.com> 09 March 2022, 23:59:40 UTC
f67d929 Initial support for documentation extraction in C++ (#2156) * #include an absolute path didn't work - because paths were taken to always be relative. * Split doc extractor such that can be used in C++ extractor. * Compiles. Update the stdlib docs. * Fix issue on release builds. * Add support for extracting documentation to C++ extractor. * Dump out markup. Make enum value backing type take tokens. * Node::Type -> Node::Kind * More improvements around Node::Type -> Node::Kind 09 March 2022, 23:38:00 UTC
727c7d2 gfx: restructure render-d3d12.cpp (#2154) * Vulkan: deferred shader compilation and pipeline creation. * Fix 32bit build. * gfx: restructure the code in render-d3d12.cpp * Move `Submitter`. * Fix. * merge with master. * Revert dictionary change in previous PR. Co-authored-by: Yong He <yhe@nvidia.com> 09 March 2022, 19:32:23 UTC
dcb434a GFX Vulkan: deferred shader compilation and pipeline creation. (#2153) * Vulkan: deferred shader compilation and pipeline creation. * Fix 32bit build. Co-authored-by: Yong He <yhe@nvidia.com> 08 March 2022, 22:34:53 UTC
771f294 Expose API-specific row alignment values (#2151) * Added function to IDevice that retrieves the row alignment for the particular API; Added rowDstStride argument to copyTextureToBuffer and changed D3D12 footprint row pitch to check that the user-supplied stride is correctly aligned before assigning to the footprint's row pitch * Changed alignment from Uint to size_t Co-authored-by: jsmall-nvidia <jsmall@nvidia.com> 08 March 2022, 20:47:32 UTC
2a80bcf Slangc improvements: help message, downstream error passthrough (#2152) * Pass through the downstream compiler error messages if they are not recognized. * Added a help message that is printed on -h, -help, --help. Added -version as an alias for -v. * Fixed the bug in -lang option processing. 08 March 2022, 20:16:32 UTC
11da2fb Small fix to use SlangResult (#2149) * Use SlangResult value. Make legacy SLANG_ERROR_ macros use SlangResult values. 02 March 2022, 15:07:26 UTC
1b0d425 Fix some typos in command line docs. (#2150) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix some typos around command line docs. 01 March 2022, 22:03:51 UTC
71fc1d2 Fix folding of no-arg constructs in SCCP pass (#2148) 01 March 2022, 18:34:07 UTC
e6c9625 Use GLSL scalar layout for constant buffers. (#2147) 01 March 2022, 02:09:27 UTC
c315779 Improved SCCP, inlining and resource specialization passes, legalize `ImageSubscript` for GLSL (#2146) 26 February 2022, 04:49:31 UTC
8990d27 Add isOccluded() and setFullScreenMode() to ISwapchain (#2145) * Added isOccluded() and setFullScreenMode() to ISwapchain and provided implementations for D3D12 (all others currently return false) * Removed isWindowOccluded variable and directly return the result of m_swapchain3->Present * Restart CI 25 February 2022, 10:58:42 UTC
97ee917 Add SPIR-V debug information via GLSLANG (#2142) * #include an absolute path didn't work - because paths were taken to always be relative. * Switch on generateDebugInfo on glslang i s any debug level is set. * Take copy of SpvOptions. Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com> 23 February 2022, 23:29:42 UTC
393d5be gfx: d3d12 performance optimizations. (#2140) * gfx: d3d12 performance optimizations. * Fix. * Fix unit test bug. * Add gfx interface for directly allocating GPU descriptor tables. Co-authored-by: Yong He <yhe@nvidia.com> 23 February 2022, 18:30:19 UTC
c479030 gfx: defer downstream shader compilation until draw/dispatch. (#2139) Co-authored-by: Yong He <yhe@nvidia.com> 20 February 2022, 22:37:41 UTC
e272aec Optimize d3d12 mutable shader object implementation. (#2138) * Optimize d3d12 mutable shader object implementation. * Disable mismatched clear value warning message from d3d sdk. * Fix. * Fix. * gfx: Avoid redundant d3d12 QueryInterface call. Co-authored-by: Yong He <yhe@nvidia.com> 19 February 2022, 08:15:17 UTC
e993ff5 Added implementations for IFence::getSharedHandle() for Vulkan and D3D12 (#2137) Co-authored-by: Yong He <yonghe@outlook.com> 19 February 2022, 06:17:13 UTC
7953c0b Fully implement the ray tracing pipeline for Vulkan (#2136) * Added implementation for dispatchRays() and ShaderTableImpl, currently missing extensions and createShaderTable() * Code written, working on finding and fixing bugs * SBT issues fixed; Added implementation for endEncoding() to ensure the bound pipeline is properly reset; Ray tracing pipeline example successfully runs without any validation errors * Fixed some incorrectly merged lines * Fixed spacing * Fixed alignment for member variables in VulkanApi * Restart CI * Removed accidental comment kept from merge; Changed getName() call to getNameOverride() 19 February 2022, 05:58:11 UTC
e031e0e Add target option to force `scalar` layout for storage buffers. (#2135) Co-authored-by: Yong He <yhe@nvidia.com> 17 February 2022, 09:15:05 UTC
d414551 Various gfx fixes. (#2132) * Various gfx fixes. * Fix test case. * Fix crash. * Trigger build * Trigger build 2 * Fix vulkan unit tests. Co-authored-by: Yong He <yhe@nvidia.com> 17 February 2022, 06:34:20 UTC
5058609 Add OSX LLVM JIT support (#2130) * #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes. Added compiler crash with generic defined in a function. Added enum-flags test that works (by limiting backing type to int), and using __EnumType constraint. * Add comment about crash. * Disable crashing test. * Fixes to make compile on OSX. * Add github build for OSX. * Make premake generator a utility. * Fix osx compilation issue. * More fixes for OSX build. * OSX fix due to ambiguity around size_t and integer types. * Disable xlib on build on osx. * Use 'prebuildcommands' to make prebuild make utility projects do something. * Small fixes for premake so utility works on linux/osx. * Another hack to try and make generators run when 'utility' * Fix typo in macos.yml. * Revert premake to old style, and disable stdlib embedding on OSX. * OSX testing. * Fix pipe handling for OSX. * Enable testing on OSX. * Small fix because uname -p is not x64 on darwin. * Use glslang from slang-binaries for OSX. * Add slang-llvm on OSX. * Upgrade slang-llvm. * Update slang-llvm for OSX JIT fix. * slang llvm 26 * Upgrade slang-llvm. * Use slangUtil to get shared library filename. * Use fixed slang-binaries. * Another small fix. * Rename linux build for clarity. 15 February 2022, 20:47:45 UTC
1278e23 Fix linux gfx issue (#2131) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix linux build issue with renderer-shared.h * Move to .cpp file. * Move some templates to stop definition order issue on linux. * Move to header because it's templated. * Fix warning about GeometryInstanceFlags::Enum flags : 8; being too small by making the enum backed by 8 bits. * Check if vkDestroySampler function is available. 15 February 2022, 20:22:52 UTC
167300e gfx: Various Vulkan fixes. (#2129) * gfx: Various Vulkan fixes. * Fix test case. * Fix vulkan crash. Co-authored-by: Yong He <yhe@nvidia.com> 11 February 2022, 20:56:17 UTC
7d296ba Add interface for querying downstream compiler time (#2127) Co-authored-by: Yong He <yhe@nvidia.com> 11 February 2022, 08:16:54 UTC
434fd8e Add glslang OSX (#2128) * #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes. Added compiler crash with generic defined in a function. Added enum-flags test that works (by limiting backing type to int), and using __EnumType constraint. * Add comment about crash. * Disable crashing test. * Fixes to make compile on OSX. * Add github build for OSX. * Make premake generator a utility. * Fix osx compilation issue. * More fixes for OSX build. * OSX fix due to ambiguity around size_t and integer types. * Disable xlib on build on osx. * Use 'prebuildcommands' to make prebuild make utility projects do something. * Small fixes for premake so utility works on linux/osx. * Another hack to try and make generators run when 'utility' * Fix typo in macos.yml. * Revert premake to old style, and disable stdlib embedding on OSX. * OSX testing. * Fix pipe handling for OSX. * Enable testing on OSX. * Small fix because uname -p is not x64 on darwin. * Use glslang from slang-binaries for OSX. 11 February 2022, 01:06:29 UTC
3f86ebf OSX CI Test (#2126) * #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes. Added compiler crash with generic defined in a function. Added enum-flags test that works (by limiting backing type to int), and using __EnumType constraint. * Add comment about crash. * Disable crashing test. * Fixes to make compile on OSX. * Add github build for OSX. * Make premake generator a utility. * Fix osx compilation issue. * More fixes for OSX build. * OSX fix due to ambiguity around size_t and integer types. * Disable xlib on build on osx. * Use 'prebuildcommands' to make prebuild make utility projects do something. * Small fixes for premake so utility works on linux/osx. * Another hack to try and make generators run when 'utility' * Fix typo in macos.yml. * Revert premake to old style, and disable stdlib embedding on OSX. * OSX testing. * Fix pipe handling for OSX. * Enable testing on OSX. * Small fix because uname -p is not x64 on darwin. 11 February 2022, 00:35:11 UTC
1c030cd gfx: Add `resolveQuery` command. (#2125) Co-authored-by: Yong He <yhe@nvidia.com> 10 February 2022, 21:59:53 UTC
120f97f gfx: support shader record overwrite and fix QueryPool. (#2123) * Various fixes to gfx. * Fix. * Fixes. * Fix. * gfx: support root parameter via user-defined attribute. * Fix. * Fix. * Skip d3d12 tests on win x86. * Fixes. * gfx: support shader record overwrite. * Fix QueyPool implementation. * Rename to `getBindingRangeLeafVariable` Co-authored-by: Yong He <yhe@nvidia.com> 10 February 2022, 20:39:55 UTC
0c04885 gfx: support d3d12 root parameters (#2122) * Various fixes to gfx. * Fix. * Fixes. * Fix. * gfx: support root parameter via user-defined attribute. * Fix. * Fix. * Skip d3d12 tests on win x86. * Fixes. Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com> 10 February 2022, 19:50:07 UTC
15f07d1 Fix MacOSX build issues (#2124) * #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes. Added compiler crash with generic defined in a function. Added enum-flags test that works (by limiting backing type to int), and using __EnumType constraint. * Add comment about crash. * Disable crashing test. * Fixes to make compile on OSX. * Add github build for OSX. * Make premake generator a utility. * Fix osx compilation issue. * More fixes for OSX build. * OSX fix due to ambiguity around size_t and integer types. * Disable xlib on build on osx. * Use 'prebuildcommands' to make prebuild make utility projects do something. * Small fixes for premake so utility works on linux/osx. * Another hack to try and make generators run when 'utility' * Fix typo in macos.yml. * Revert premake to old style, and disable stdlib embedding on OSX. 10 February 2022, 18:57:59 UTC
b8982fc Various fixes to gfx. (#2120) * Various fixes to gfx. * Fix. * Fixes. * Fix. Co-authored-by: Yong He <yhe@nvidia.com> 09 February 2022, 23:30:38 UTC
59f3fdc Added a simple test for getFormatSupportedResourceStates() (#2118) * Checkpoint * Fixed problem with global variables in supported resource states test, test is functional for both Vulkan and D3D12 * Removed a comment * Added a loop over all existing formats * Rerun tests 09 February 2022, 20:23:00 UTC
160111a Generic experiments (#2119) * #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes. Added compiler crash with generic defined in a function. Added enum-flags test that works (by limiting backing type to int), and using __EnumType constraint. * Add comment about crash. * Disable crashing test. 09 February 2022, 16:26:04 UTC
d06a78d Add gfx interop to allow more direct D3D12 usage scenarios. (#2117) * Add gfx interop to allow more direct D3D12 usage scenarios. * Fix compile error in win32. * gfx: Implement IFence::getNativeHandle() on d3d12. * More GFX-D3D interop interface. * Fix cuda. Co-authored-by: Yong He <yhe@nvidia.com> 04 February 2022, 03:17:30 UTC
5eb835f Fixed naming conflicts in heterogeneous-hello-world (#2114) * Fixed naming conflicts in heterogeneous-hello-world Added 3 new modifiers (`__unmangled`, `__exportDirectly`, `__externLib`) `__unmangled` causes mangleName() to return the normal name of the decl. `__exportDirectly` changes parent decl name concatenation behavior to use "::" instead of "." (for Name Hint) and emits the name hint when it exists, otherwise it emits the mangled name. `__externLib` stops Slang from emitting the corresponding struct. Also made necessary changes to heterogeneous-hello-world so that this new functionality is shown off. * Undo unintentional formatting changes Co-authored-by: Yong He <yonghe@outlook.com> 04 February 2022, 03:16:54 UTC
1eda863 Added Vulkan implementation for createRayTracingPipelineState() (#2109) * preliminary work on createRayTracingPipelineState for Vulkan * more stuff added to createRayTracingPipelineState * Finished filling in all necessary fields for createRayTracingPipelineState() for Vulkan Co-authored-by: Yong He <yonghe@outlook.com> 04 February 2022, 00:16:33 UTC
e586610 Added Vulkan implementation of getFormatSupportedResourceStates() (#2108) * Prelim work on getFormatSupportedResourceStates * Mostly extended getFormatSupportedResourceStates to cover currently existing resource states, no testing included yet Co-authored-by: Theresa Foley <tfoleyNV@users.noreply.github.com> 04 February 2022, 00:08:13 UTC
3aaa586 'Explicit specialization' experiments with extensions (#2099) * #include an absolute path didn't work - because paths were taken to always be relative. * Explicit specialization with multiple parameters. * Fix tabs. * Small improvements in test comments. 03 February 2022, 14:28:54 UTC
5deb829 GFX: Add API interception mechanism for pipeline creation. (#2115) This allows the user application to intercept API calls to create pipeline states. This feature can be used to integrate NVAPI in the user application. Co-authored-by: Yong He <yhe@nvidia.com> 02 February 2022, 04:00:55 UTC
back to top