diff options
| author | Devon <devonrutledge03@gmail.com> | 2025-02-27 18:52:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-27 17:52:14 -0800 |
| commit | cd20e94af9f384c03e8be69f6c8ce9e97212cc9b (patch) | |
| tree | 6e67aab570d8e87ca92ff989126abf3613fc97c1 /tests/reflection | |
| parent | 6f2ce72b038b34e84819ddfc5d658166ed879eaa (diff) | |
Add inner texture type to reflection json (#6416)
* Add inner texture type to reflection json
* Add expected result of test
* Adjust test expected results
* Fix ci test result
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/reflection')
20 files changed, 700 insertions, 51 deletions
diff --git a/tests/reflection/arrays.hlsl.expected b/tests/reflection/arrays.hlsl.expected index f53d63723..3e0bd6723 100644 --- a/tests/reflection/arrays.hlsl.expected +++ b/tests/reflection/arrays.hlsl.expected @@ -90,7 +90,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -101,7 +109,15 @@ standard output = { "elementCount": 16, "elementType": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } }, @@ -110,7 +126,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 17}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/binding-gl.hlsl.expected b/tests/reflection/binding-gl.hlsl.expected index 73c4da3ae..67df7c267 100644 --- a/tests/reflection/binding-gl.hlsl.expected +++ b/tests/reflection/binding-gl.hlsl.expected @@ -90,7 +90,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "space": 2, "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -98,7 +106,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "space": 3, "index": 2}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -106,7 +122,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/binding-push-constant-gl.hlsl.expected b/tests/reflection/binding-push-constant-gl.hlsl.expected index 6570625e9..7321c5fac 100644 --- a/tests/reflection/binding-push-constant-gl.hlsl.expected +++ b/tests/reflection/binding-push-constant-gl.hlsl.expected @@ -147,7 +147,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "space": 2, "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -155,7 +163,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "space": 3, "index": 2}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -163,7 +179,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/cross-compile.slang.expected b/tests/reflection/cross-compile.slang.expected index f85e4e0e9..2cd77fee2 100644 --- a/tests/reflection/cross-compile.slang.expected +++ b/tests/reflection/cross-compile.slang.expected @@ -9,7 +9,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/default-space.slang.expected b/tests/reflection/default-space.slang.expected index c6ec6c19f..17cc32736 100644 --- a/tests/reflection/default-space.slang.expected +++ b/tests/reflection/default-space.slang.expected @@ -9,7 +9,15 @@ standard output = { "binding": {"kind": "shaderResource", "space": 99, "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -25,7 +33,15 @@ standard output = { "name": "b", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} } @@ -43,7 +59,15 @@ standard output = { "name": "b", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} } diff --git a/tests/reflection/explicit-register-space.slang.expected b/tests/reflection/explicit-register-space.slang.expected index 725318084..a43efd2bd 100644 --- a/tests/reflection/explicit-register-space.slang.expected +++ b/tests/reflection/explicit-register-space.slang.expected @@ -9,7 +9,15 @@ standard output = { "binding": {"kind": "shaderResource", "space": 2, "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } ], diff --git a/tests/reflection/global-type-params.slang.expected b/tests/reflection/global-type-params.slang.expected index 0da9c975e..07180b7ea 100644 --- a/tests/reflection/global-type-params.slang.expected +++ b/tests/reflection/global-type-params.slang.expected @@ -71,7 +71,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/multi-file.hlsl.expected b/tests/reflection/multi-file.hlsl.expected index 0472a0b0a..804e5874f 100644 --- a/tests/reflection/multi-file.hlsl.expected +++ b/tests/reflection/multi-file.hlsl.expected @@ -9,7 +9,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -135,7 +143,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -261,7 +277,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 2}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -387,7 +411,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 3}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -395,7 +427,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 4}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } ], diff --git a/tests/reflection/parameter-block-explicit-space.slang.expected b/tests/reflection/parameter-block-explicit-space.slang.expected index 908029839..347f0fd5c 100644 --- a/tests/reflection/parameter-block-explicit-space.slang.expected +++ b/tests/reflection/parameter-block-explicit-space.slang.expected @@ -29,7 +29,15 @@ standard output = { "name": "at1", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -37,7 +45,15 @@ standard output = { "name": "at2", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 1} }, @@ -77,7 +93,15 @@ standard output = { "name": "at1", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -85,7 +109,15 @@ standard output = { "name": "at2", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 1} }, @@ -131,7 +163,15 @@ standard output = { "name": "bt", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -171,7 +211,15 @@ standard output = { "name": "bt", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, diff --git a/tests/reflection/parameter-block.slang.1.expected b/tests/reflection/parameter-block.slang.1.expected index 5b1b45624..59fe15787 100644 --- a/tests/reflection/parameter-block.slang.1.expected +++ b/tests/reflection/parameter-block.slang.1.expected @@ -20,7 +20,15 @@ standard output = { "name": "t", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -45,7 +53,15 @@ standard output = { "name": "t", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -70,7 +86,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } ], diff --git a/tests/reflection/parameter-block.slang.2.expected b/tests/reflection/parameter-block.slang.2.expected index 31477df38..ef7b21e1a 100644 --- a/tests/reflection/parameter-block.slang.2.expected +++ b/tests/reflection/parameter-block.slang.2.expected @@ -17,7 +17,15 @@ standard output = { "name": "t", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -42,7 +50,15 @@ standard output = { "name": "t", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -67,7 +83,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } ], diff --git a/tests/reflection/parameter-block.slang.expected b/tests/reflection/parameter-block.slang.expected index 48b1bccbd..f3c31d4a9 100644 --- a/tests/reflection/parameter-block.slang.expected +++ b/tests/reflection/parameter-block.slang.expected @@ -17,7 +17,15 @@ standard output = { "name": "t", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "descriptorTableSlot", "index": 0} }, @@ -42,7 +50,15 @@ standard output = { "name": "t", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "descriptorTableSlot", "index": 0} }, @@ -64,7 +80,15 @@ standard output = { "binding": {"kind": "descriptorTableSlot", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } ], diff --git a/tests/reflection/reflect-imported-code.hlsl.expected b/tests/reflection/reflect-imported-code.hlsl.expected index cff6c50bb..8a906d0f7 100644 --- a/tests/reflection/reflect-imported-code.hlsl.expected +++ b/tests/reflection/reflect-imported-code.hlsl.expected @@ -9,7 +9,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -63,7 +71,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/reflection0.hlsl.expected b/tests/reflection/reflection0.hlsl.expected index 10f228cb1..f435aa829 100644 --- a/tests/reflection/reflection0.hlsl.expected +++ b/tests/reflection/reflection0.hlsl.expected @@ -9,7 +9,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/resource-in-cbuffer.hlsl.expected b/tests/reflection/resource-in-cbuffer.hlsl.expected index 7d4251684..f85a5fb59 100644 --- a/tests/reflection/resource-in-cbuffer.hlsl.expected +++ b/tests/reflection/resource-in-cbuffer.hlsl.expected @@ -32,7 +32,15 @@ standard output = { "name": "myTexture", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, @@ -76,7 +84,15 @@ standard output = { "name": "myTexture", "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, diff --git a/tests/reflection/shared-modifier.hlsl.expected b/tests/reflection/shared-modifier.hlsl.expected index 61774ed19..252c764d2 100644 --- a/tests/reflection/shared-modifier.hlsl.expected +++ b/tests/reflection/shared-modifier.hlsl.expected @@ -9,7 +9,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { diff --git a/tests/reflection/texture-resource-type.slang b/tests/reflection/texture-resource-type.slang new file mode 100644 index 000000000..2455ba611 --- /dev/null +++ b/tests/reflection/texture-resource-type.slang @@ -0,0 +1,21 @@ +// texture-resource-type.slang + +// Tests reflection of inner texture type. + +//TEST:REFLECTION:-stage compute -entry main -target hlsl + +Texture2D NoParameters; +Texture2D<float> FloatTexture; +Texture2D<float2> FloatTwoTexture; +Texture2D<float4> FloatFourTexture; +Texture2D<int> IntTexture; +Texture2D<int2> IntTwoTexture; +Texture2D<int4> IntFourTexture; +Texture2D<uint> UintTexture; +Texture2D<uint2> UintTwoTexture; +Texture2D<uint4> UintFourTexture; + +[numthreads(1, 1, 1)] +void main(uint3 dispatchThreadID : SV_DispatchThreadID) +{ +} diff --git a/tests/reflection/texture-resource-type.slang.expected b/tests/reflection/texture-resource-type.slang.expected new file mode 100644 index 000000000..48d1f0f79 --- /dev/null +++ b/tests/reflection/texture-resource-type.slang.expected @@ -0,0 +1,220 @@ +result code = 0 +standard error = { +} +standard output = { +{ + "parameters": [ + { + "name": "NoParameters", + "binding": {"kind": "shaderResource", "index": 0}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } + } + }, + { + "name": "FloatTexture", + "binding": {"kind": "shaderResource", "index": 1}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "scalar", + "scalarType": "float32" + } + } + }, + { + "name": "FloatTwoTexture", + "binding": {"kind": "shaderResource", "index": 2}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 2, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } + } + }, + { + "name": "FloatFourTexture", + "binding": {"kind": "shaderResource", "index": 3}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } + } + }, + { + "name": "IntTexture", + "binding": {"kind": "shaderResource", "index": 4}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "scalar", + "scalarType": "int32" + } + } + }, + { + "name": "IntTwoTexture", + "binding": {"kind": "shaderResource", "index": 5}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 2, + "elementType": { + "kind": "scalar", + "scalarType": "int32" + } + } + } + }, + { + "name": "IntFourTexture", + "binding": {"kind": "shaderResource", "index": 6}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "int32" + } + } + } + }, + { + "name": "UintTexture", + "binding": {"kind": "shaderResource", "index": 7}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "scalar", + "scalarType": "uint32" + } + } + }, + { + "name": "UintTwoTexture", + "binding": {"kind": "shaderResource", "index": 8}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 2, + "elementType": { + "kind": "scalar", + "scalarType": "uint32" + } + } + } + }, + { + "name": "UintFourTexture", + "binding": {"kind": "shaderResource", "index": 9}, + "type": { + "kind": "resource", + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "uint32" + } + } + } + } + ], + "entryPoints": [ + { + "name": "main", + "stage": "compute", + "parameters": [ + { + "name": "dispatchThreadID", + "semanticName": "SV_DISPATCHTHREADID", + "type": { + "kind": "vector", + "elementCount": 3, + "elementType": { + "kind": "scalar", + "scalarType": "uint32" + } + } + } + ], + "threadGroupSize": [1, 1, 1], + "bindings": [ + { + "name": "NoParameters", + "binding": {"kind": "shaderResource", "index": 0, "used": 0} + }, + { + "name": "FloatTexture", + "binding": {"kind": "shaderResource", "index": 1, "used": 0} + }, + { + "name": "FloatTwoTexture", + "binding": {"kind": "shaderResource", "index": 2, "used": 0} + }, + { + "name": "FloatFourTexture", + "binding": {"kind": "shaderResource", "index": 3, "used": 0} + }, + { + "name": "IntTexture", + "binding": {"kind": "shaderResource", "index": 4, "used": 0} + }, + { + "name": "IntTwoTexture", + "binding": {"kind": "shaderResource", "index": 5, "used": 0} + }, + { + "name": "IntFourTexture", + "binding": {"kind": "shaderResource", "index": 6, "used": 0} + }, + { + "name": "UintTexture", + "binding": {"kind": "shaderResource", "index": 7, "used": 0} + }, + { + "name": "UintTwoTexture", + "binding": {"kind": "shaderResource", "index": 8, "used": 0} + }, + { + "name": "UintFourTexture", + "binding": {"kind": "shaderResource", "index": 9, "used": 0} + } + ] + } + ] +} +} diff --git a/tests/reflection/unbounded-arrays.hlsl.1.expected b/tests/reflection/unbounded-arrays.hlsl.1.expected index c8d8f6bed..e4eb111ff 100644 --- a/tests/reflection/unbounded-arrays.hlsl.1.expected +++ b/tests/reflection/unbounded-arrays.hlsl.1.expected @@ -23,7 +23,15 @@ standard output = { "elementCount": 0, "elementType": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } }, @@ -32,7 +40,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -40,7 +56,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -51,7 +75,15 @@ standard output = { "elementCount": 0, "elementType": { "kind": "resource", - "baseShape": "textureCube" + "baseShape": "textureCube", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } } }, @@ -60,7 +92,15 @@ standard output = { "binding": {"kind": "shaderResource", "space": 1, "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -77,7 +117,15 @@ standard output = { "name": "t", "type": { "kind": "resource", - "baseShape": "texture3D" + "baseShape": "texture3D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } }, "binding": {"kind": "shaderResource", "index": 0} }, diff --git a/tests/reflection/used-parameters.slang.expected b/tests/reflection/used-parameters.slang.expected index fb63e55f9..0a4fba104 100644 --- a/tests/reflection/used-parameters.slang.expected +++ b/tests/reflection/used-parameters.slang.expected @@ -107,7 +107,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 0}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -115,7 +123,15 @@ standard output = { "binding": {"kind": "shaderResource", "index": 1}, "type": { "kind": "resource", - "baseShape": "texture2D" + "baseShape": "texture2D", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -164,7 +180,15 @@ standard output = { "type": { "kind": "resource", "baseShape": "texture2D", - "access": "readWrite" + "access": "readWrite", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { @@ -173,7 +197,15 @@ standard output = { "type": { "kind": "resource", "baseShape": "texture2D", - "access": "readWrite" + "access": "readWrite", + "resultType": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + } } }, { |
