summaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/gh-103.slang8
-rw-r--r--tests/bugs/gh-333.slang12
-rw-r--r--tests/bugs/implicit-conversion-binary-op.hlsl2
-rw-r--r--tests/bugs/split-nested-types.hlsl17
-rw-r--r--tests/bugs/split-nested-types.slang4
-rw-r--r--tests/bugs/vec-init-list.hlsl8
6 files changed, 44 insertions, 7 deletions
diff --git a/tests/bugs/gh-103.slang b/tests/bugs/gh-103.slang
index b89f38098..5d271d508 100644
--- a/tests/bugs/gh-103.slang
+++ b/tests/bugs/gh-103.slang
@@ -2,6 +2,12 @@
// Ensure that matrix-times-scalar works
+#ifndef __SLANG__
+#define C _SV022SLANG_parameterGroup_C
+#define a _SV022SLANG_ParameterGroup_C1a
+#define b _SV022SLANG_ParameterGroup_C1b
+#endif
+
float4x4 doIt(float4x4 a, float b)
{
return a * b;
@@ -13,7 +19,7 @@ cbuffer C
float b;
};
-float4 main() : SV_Target
+float4 main() : SV_TARGET
{
return doIt(a, b)[0];
}
diff --git a/tests/bugs/gh-333.slang b/tests/bugs/gh-333.slang
index fdc478950..5a0a5769f 100644
--- a/tests/bugs/gh-333.slang
+++ b/tests/bugs/gh-333.slang
@@ -2,6 +2,16 @@
// Ensure declaration order in output is correct
+#ifndef __SLANG__
+#define A _ST01A
+#define x _SV01A1x
+#define B _ST01B
+#define y _SV01B1y
+#define C _SV022SLANG_parameterGroup_CL0
+#define a _SV022SLANG_ParameterGroup_C1a
+#define b _SV022SLANG_ParameterGroup_C1b
+#endif
+
struct A
{
float x;
@@ -19,7 +29,7 @@ cbuffer C
B b;
};
-float4 main() : SV_Target
+float4 main() : SV_TARGET
{
return a.x;
}
diff --git a/tests/bugs/implicit-conversion-binary-op.hlsl b/tests/bugs/implicit-conversion-binary-op.hlsl
index 75ff737da..b9a558474 100644
--- a/tests/bugs/implicit-conversion-binary-op.hlsl
+++ b/tests/bugs/implicit-conversion-binary-op.hlsl
@@ -10,7 +10,7 @@
float4 main(
float4 a : A,
uint4 b : B
- ) : SV_Target
+ ) : SV_TARGET
{
return a * b;
}
diff --git a/tests/bugs/split-nested-types.hlsl b/tests/bugs/split-nested-types.hlsl
index 0a8a8f9ff..8216a4e36 100644
--- a/tests/bugs/split-nested-types.hlsl
+++ b/tests/bugs/split-nested-types.hlsl
@@ -4,11 +4,24 @@
import split_nested_types;
#else
+#define A _ST01A
+#define x _SV01A1x
+
+#define B _ST01B
+#define y _SV01B1y
+
+#define M _ST01M
+#define a _SV01M1a
+#define b _SV01M1b
+
+#define C _SV022SLANG_parameterGroup_CL0
+#define m _SV022SLANG_ParameterGroup_C1m
+
struct A { int x; };
struct B { float y; };
-struct C { Texture2D t; SamplerState s; };
+struct CC { Texture2D t; SamplerState s; };
struct M
{
@@ -23,7 +36,7 @@ cbuffer C
M m;
}
-float4 main() : SV_target
+float4 main() : SV_TARGET
{
return m.b.y;
}
diff --git a/tests/bugs/split-nested-types.slang b/tests/bugs/split-nested-types.slang
index ccf95d906..3bd4e239f 100644
--- a/tests/bugs/split-nested-types.slang
+++ b/tests/bugs/split-nested-types.slang
@@ -4,11 +4,11 @@ struct A { int x; };
struct B { float y; };
-struct C { Texture2D t; SamplerState s; };
+struct CC { Texture2D t; SamplerState s; };
struct M
{
A a;
B b;
- C c;
+ CC c;
};
diff --git a/tests/bugs/vec-init-list.hlsl b/tests/bugs/vec-init-list.hlsl
index be1bc5c6f..d9d0b83f9 100644
--- a/tests/bugs/vec-init-list.hlsl
+++ b/tests/bugs/vec-init-list.hlsl
@@ -2,6 +2,14 @@
// Check handling of initializer list for vector
+#ifndef __SLANG__
+
+#define C _SV022SLANG_parameterGroup_C
+#define a _SV022SLANG_ParameterGroup_C1a
+#define SV_Position SV_POSITION
+
+#endif
+
cbuffer C : register(b0)
{
float4 a;