diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2019-06-19 07:23:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-19 07:23:49 -0700 |
| commit | 48ae5496516878768d7de241b9b7fbba91fbaa74 (patch) | |
| tree | 0579405dcca82fa4a7296efea5c5e9bc963f7495 /tests/reflection | |
| parent | 7c9298d8b10b5f4e69e24e3eb933e93e0d92fc37 (diff) | |
Start exposing a new COM-lite API (#987)
* Start exposing a new COM-lite API
This change is mostly about exposing a new API to the Slang compiler that allows more fine-grained control over the compilation flow. The basic concepts in the new API are:
* An `IGlobalSession` is the granularity at which we load/parse the Slang stdlib, and therefore gives applications a way to amortize startup cost for the library across multiple compiles. This is a concept that might be able to go away in a future version of Slang.
* An `ISession` owns all the code that gets loaded/compiled/generated. Any `import`ed modules are shared across everything in a session (we don't re-parse/-check the code when we see another `import` for the same module). Any generic- or interface-based code in the session can be specialized using types from the same session (but not necessarily across sessions).
* An `IModule` is the unit of code loading and scoping. It doesn't expose any API in this change, but would be the right scope for looking up types or entry points by name.
* An `IProgram` is a "linked" combination of modules and entry points from which code can be generated and reflection information queried.
This change re-uses the existing reflection API types, rather than introduce a new API that duplicates that functionality. That will probably change in a future revision.
There are two major pieces of functionality added here that aren't related to the new API:
* We now have an API concept of "entry point groups" which are one or more entry points that are intended to be used together so that they need to have non-overlapping parameters. For now this is being used to handle "hit groups" and local root signatures for ray tracing, but I'm not sure this is a concept we will keep in the long run.
* We have a very special-case (client-application-specific) flag that ascribes special meaning to the `shared` keyword, so that it can be attached to global parameters to indicate that they are actually to be part of the local root signature rather than the global one for DXR.
None of the API design (including naming) here is finalized; the only reason to check in the changes at this point to avoid having a long-running branch that leads to merge pain. Clients should *not* try to depend on the new API just yet, since it is still a work in progress.
* fixup: clang warning
* fixup: try to detect clang C++11 support
* fixup
* fixup
* fixup
* fixup
* fixup: review feedback
Diffstat (limited to 'tests/reflection')
| -rw-r--r-- | tests/reflection/parameter-block-explicit-space.slang.expected | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/reflection/parameter-block-explicit-space.slang.expected b/tests/reflection/parameter-block-explicit-space.slang.expected index 04093f4ca..f7944c644 100644 --- a/tests/reflection/parameter-block-explicit-space.slang.expected +++ b/tests/reflection/parameter-block-explicit-space.slang.expected @@ -7,7 +7,7 @@ standard output = { { "name": "a", "bindings": [ - {"kind": "constantBuffer", "space": 2, "index": 0, "count": 0}, + {"kind": "constantBuffer", "index": 0, "count": 0}, {"kind": "registerSpace", "index": 2} ], "type": { @@ -58,7 +58,7 @@ standard output = { { "name": "b", "bindings": [ - {"kind": "constantBuffer", "space": 3, "index": 0, "count": 0}, + {"kind": "constantBuffer", "index": 0, "count": 0}, {"kind": "registerSpace", "index": 3} ], "type": { |
