diff options
Diffstat (limited to 'tests/reflection')
| -rw-r--r-- | tests/reflection/sample-index-input.hlsl | 15 | ||||
| -rw-r--r-- | tests/reflection/sample-index-input.hlsl.expected | 52 | ||||
| -rw-r--r-- | tests/reflection/sample-rate-input.hlsl | 15 | ||||
| -rw-r--r-- | tests/reflection/sample-rate-input.hlsl.expected | 58 |
4 files changed, 140 insertions, 0 deletions
diff --git a/tests/reflection/sample-index-input.hlsl b/tests/reflection/sample-index-input.hlsl new file mode 100644 index 000000000..edb0690d6 --- /dev/null +++ b/tests/reflection/sample-index-input.hlsl @@ -0,0 +1,15 @@ +//TEST:REFLECTION:-profile ps_5_0 -target hlsl + +// Confirm that we register a shader as sample-rate when +// it declares `SV_SampleIndex` as an input. + +struct PSInput +{ + float4 color : COLOR; + uint sampleIndex : SV_SampleIndex; +}; + +float4 main(PSInput input) : SV_Target +{ + return input.color; +}
\ No newline at end of file diff --git a/tests/reflection/sample-index-input.hlsl.expected b/tests/reflection/sample-index-input.hlsl.expected new file mode 100644 index 000000000..5bf5f297e --- /dev/null +++ b/tests/reflection/sample-index-input.hlsl.expected @@ -0,0 +1,52 @@ +result code = 0 +standard error = { +} +standard output = { +{ + "parameters": [ + + ], + "entryPoints": [ + { + "name": "main", + "stage:": "fragment", + "parameters": [ + { + "name": "input", + "stage": "fragment", + "binding": {"kind": "varyingInput", "index": 0}, + "type": { + "kind": "struct", + "name": "PSInput", + "fields": [ + { + "name": "color", + "type": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + }, + "stage": "fragment", + "binding": {"kind": "varyingInput", "index": 0}, + "semanticName": "COLOR" + }, + { + "name": "sampleIndex", + "type": { + "kind": "scalar", + "scalarType": "uint32" + }, + "semanticName": "SV_SAMPLEINDEX" + } + ] + } + } + ], + "usesAnySampleRateInput": true + } + ] +} +} diff --git a/tests/reflection/sample-rate-input.hlsl b/tests/reflection/sample-rate-input.hlsl new file mode 100644 index 000000000..0545afb02 --- /dev/null +++ b/tests/reflection/sample-rate-input.hlsl @@ -0,0 +1,15 @@ +//TEST:REFLECTION:-profile ps_5_0 -target hlsl + +// Confirm that we register a shader as sample-rate when +// it declares (not necessarly *uses*) a `sample` qualified input + +struct PSInput +{ + float4 extra : EXTRA; + sample float4 color : COLOR; +}; + +float4 main(PSInput input) : SV_Target +{ + return input.extra + input.color; +}
\ No newline at end of file diff --git a/tests/reflection/sample-rate-input.hlsl.expected b/tests/reflection/sample-rate-input.hlsl.expected new file mode 100644 index 000000000..0c86ebecb --- /dev/null +++ b/tests/reflection/sample-rate-input.hlsl.expected @@ -0,0 +1,58 @@ +result code = 0 +standard error = { +} +standard output = { +{ + "parameters": [ + + ], + "entryPoints": [ + { + "name": "main", + "stage:": "fragment", + "parameters": [ + { + "name": "input", + "stage": "fragment", + "binding": {"kind": "varyingInput", "index": 0, "count": 2}, + "type": { + "kind": "struct", + "name": "PSInput", + "fields": [ + { + "name": "extra", + "type": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + }, + "stage": "fragment", + "binding": {"kind": "varyingInput", "index": 0}, + "semanticName": "EXTRA" + }, + { + "name": "color", + "type": { + "kind": "vector", + "elementCount": 4, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + }, + "stage": "fragment", + "binding": {"kind": "varyingInput", "index": 1}, + "semanticName": "COLOR" + } + ] + } + } + ], + "usesAnySampleRateInput": true + } + ] +} +} |
