diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-11-30 10:42:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-30 10:42:42 -0800 |
| commit | e40c106d6f8c4218de5a16450f201c0e395f8167 (patch) | |
| tree | 3f50413628102d9fe7936afca96ab063d7f9be56 /tests/reflection/parameter-block.slang.1.expected | |
| parent | b51a582a0ed5943765c220152b1e15cda8c2a555 (diff) | |
Use register spaces by default for D3D12 targets (#734)
The change here is that the logical that used to be controlled by `-parameter-blocks-use-register-spaces` is now turned on unconditionally, meaning that a `ParameterBlock<X>` will get its own register `space` by default when targetting D3D Shader Model 5.1 and later.
I had originally made this feature optional because I wasn't sure whether Shader Model 5.1 should default to using register spaces or not, because D3D 11 doesn't support spaces at the API level and MSDN documetnation made it sound like SM5.1 was available for D3D11 as well. Subsequent reading has led me to understand that MSDN is wrong on this front, and SM5.1 and later are D3D12-only, so it is always safe to use spaces.
The new logic is now that we automatically use spaces for parameter blocks any time it is possible (SM5.1+ and any Vulkan target), and otherwise fall back to not using spaces (SM5.0 and earlier).
I updated a reflection test case that was covering parameter blocks to confirm the output differs between SM5.0 and 5.1.
Diffstat (limited to 'tests/reflection/parameter-block.slang.1.expected')
| -rw-r--r-- | tests/reflection/parameter-block.slang.1.expected | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/reflection/parameter-block.slang.1.expected b/tests/reflection/parameter-block.slang.1.expected new file mode 100644 index 000000000..bbd52a784 --- /dev/null +++ b/tests/reflection/parameter-block.slang.1.expected @@ -0,0 +1,54 @@ +result code = 0 +standard error = { +} +standard output = { +{ + "parameters": [ + { + "name": "a", + "bindings": [ + {"kind": "shaderResource", "index": 0}, + {"kind": "samplerState", "index": 0} + ], + "type": { + "kind": "parameterBlock", + "elementType": { + "kind": "struct", + "name": "Helper", + "fields": [ + { + "name": "t", + "type": { + "kind": "resource", + "baseShape": "texture2D" + }, + "binding": {"kind": "shaderResource", "index": 0} + }, + { + "name": "s", + "type": { + "kind": "samplerState" + }, + "binding": {"kind": "samplerState", "index": 0} + } + ] + } + } + }, + { + "name": "b", + "binding": {"kind": "shaderResource", "index": 1}, + "type": { + "kind": "resource", + "baseShape": "texture2D" + } + } + ], + "entryPoints": [ + { + "name": "main", + "stage:": "fragment" + } + ] +} +} |
