summaryrefslogtreecommitdiff
path: root/tests/reflection
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reflection')
-rw-r--r--tests/reflection/global-type-params.slang4
-rw-r--r--tests/reflection/global-type-params.slang.expected52
-rw-r--r--tests/reflection/global-uniforms.hlsl1
3 files changed, 29 insertions, 28 deletions
diff --git a/tests/reflection/global-type-params.slang b/tests/reflection/global-type-params.slang
index bfeb7fb2e..74961b7cc 100644
--- a/tests/reflection/global-type-params.slang
+++ b/tests/reflection/global-type-params.slang
@@ -3,7 +3,6 @@
// Confirm that we handle global generic parameters
-float4 u;
interface IBase
{};
@@ -24,10 +23,11 @@ SamplerState s;
cbuffer CB
{
+ float4 u;
float4 v;
+ float4 w;
}
-float4 w;
float4 main() : SV_Target
{
diff --git a/tests/reflection/global-type-params.slang.expected b/tests/reflection/global-type-params.slang.expected
index 308738b55..8f6ba2838 100644
--- a/tests/reflection/global-type-params.slang.expected
+++ b/tests/reflection/global-type-params.slang.expected
@@ -5,18 +5,6 @@ standard output = {
{
"parameters": [
{
- "name": "u",
- "binding": {"kind": "uniform", "offset": 0, "size": 16},
- "type": {
- "kind": "vector",
- "elementCount": 4,
- "elementType": {
- "kind": "scalar",
- "scalarType": "float32"
- }
- }
- },
- {
"name": "arg",
"binding": {"kind": "generic", "index": 0},
"type": {
@@ -65,14 +53,14 @@ standard output = {
},
{
"name": "CB",
- "binding": {"kind": "constantBuffer", "index": 1},
+ "binding": {"kind": "constantBuffer", "index": 0},
"type": {
"kind": "constantBuffer",
"elementType": {
"kind": "struct",
"fields": [
{
- "name": "v",
+ "name": "u",
"type": {
"kind": "vector",
"elementCount": 4,
@@ -82,22 +70,34 @@ standard output = {
}
},
"binding": {"kind": "uniform", "offset": 0, "size": 16}
+ },
+ {
+ "name": "v",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 16}
+ },
+ {
+ "name": "w",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 32, "size": 16}
}
]
}
}
- },
- {
- "name": "w",
- "binding": {"kind": "uniform", "offset": 16, "size": 16},
- "type": {
- "kind": "vector",
- "elementCount": 4,
- "elementType": {
- "kind": "scalar",
- "scalarType": "float32"
- }
- }
}
],
"entryPoints": [
diff --git a/tests/reflection/global-uniforms.hlsl b/tests/reflection/global-uniforms.hlsl
index 884042cfa..6d4992db2 100644
--- a/tests/reflection/global-uniforms.hlsl
+++ b/tests/reflection/global-uniforms.hlsl
@@ -1,3 +1,4 @@
+//TEST_IGNORE_FILE
//TEST:REFLECTION:-profile ps_4_0 -target hlsl
// Confirm that we handle uniforms at global scope