diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2020-09-11 13:21:10 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-11 13:21:10 -0700 |
| commit | 459e788e2d2b6d21b0bed95cf3046bb8d0e6b8f3 (patch) | |
| tree | 710184234b0ee4411798dec0561bad1e08e781de /tests/reflection/resource-in-cbuffer.hlsl.expected | |
| parent | e5b796db188416dfc414dab27b92c86b0b53de2b (diff) | |
Remove some "do what I mean" logic from reflection API (#1539)
The reflection API had a bit of DWIM (Do What I Mean) logic in that a client could query the resource usage/bindings of a `ParameterBlock<X>` and see not only the register `space` or descriptor `set` for the block itself, but also the constant buffer `register` or `binding` for its default constant buffer (if any).
The reason for this behavior was that there was existing client code in Falcor that relied on that behavior for parameter blocks, and even after changing the way that parameter block layouts were computed and stored we sought to maintain backwards compatibility with that client code. The trouble is that the weird behavior then goes on to cause confusion for other clients of the Slang reflection API.
This change removes the special-case logic, and fixes up our reflection tests to mirror the new (correct) information that we return.
When this change is released, it will be a breaking change for any client code that still relies on the old behavior. We will need to coordinate with client application developers to fix their reflection logic. Note that all the same information can still be accessed, simply by using new reflection API that we have added.
Diffstat (limited to 'tests/reflection/resource-in-cbuffer.hlsl.expected')
| -rw-r--r-- | tests/reflection/resource-in-cbuffer.hlsl.expected | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/reflection/resource-in-cbuffer.hlsl.expected b/tests/reflection/resource-in-cbuffer.hlsl.expected index 03299a8e0..3be146d7c 100644 --- a/tests/reflection/resource-in-cbuffer.hlsl.expected +++ b/tests/reflection/resource-in-cbuffer.hlsl.expected @@ -6,7 +6,11 @@ standard output = { "parameters": [ { "name": "MyConstantBuffer", - "binding": {"kind": "constantBuffer", "index": 0}, + "bindings": [ + {"kind": "constantBuffer", "index": 0}, + {"kind": "shaderResource", "index": 0}, + {"kind": "samplerState", "index": 0} + ], "type": { "kind": "constantBuffer", "elementType": { |
