summaryrefslogtreecommitdiff
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/array-size-static-const.hlsl2
-rw-r--r--tests/bugs/cbuffer-member-init.hlsl7
-rw-r--r--tests/bugs/do-loop.hlsl2
-rw-r--r--tests/bugs/gh-171.slang10
-rw-r--r--tests/bugs/gh-172.slang18
-rw-r--r--tests/bugs/gh-295.hlsl5
-rw-r--r--tests/bugs/gh-34.hlsl6
-rw-r--r--tests/bugs/implicit-conversion-binary-op.hlsl2
-rw-r--r--tests/bugs/import-overload-error.hlsl4
-rw-r--r--tests/bugs/matrix-mult.glsl4
-rw-r--r--tests/bugs/split-nested-types.hlsl2
-rw-r--r--tests/bugs/uav-write-index.hlsl9
-rw-r--r--tests/bugs/vec-init-list.hlsl2
13 files changed, 45 insertions, 28 deletions
diff --git a/tests/bugs/array-size-static-const.hlsl b/tests/bugs/array-size-static-const.hlsl
index fe15d402d..643d4733e 100644
--- a/tests/bugs/array-size-static-const.hlsl
+++ b/tests/bugs/array-size-static-const.hlsl
@@ -1,5 +1,5 @@
// array-size-static-const.hlsl
-//TEST:COMPARE_HLSL: -profile cs_5_0 -target dxbc-assembly
+//TEST:COMPARE_HLSL: -profile cs_5_0
// The bug in this case is that were have a (hidden)
// cast from the `uint` constant to `int` to get
diff --git a/tests/bugs/cbuffer-member-init.hlsl b/tests/bugs/cbuffer-member-init.hlsl
index fe6db8af0..fbfa3f220 100644
--- a/tests/bugs/cbuffer-member-init.hlsl
+++ b/tests/bugs/cbuffer-member-init.hlsl
@@ -1,4 +1,4 @@
-//TEST:COMPARE_HLSL: -profile vs_5_0 -target dxbc-assembly -no-checking
+//TEST:COMPARE_HLSL: -profile vs_5_0
// Allow (but ignore) initializer on `cbuffer` member
@@ -7,7 +7,8 @@ cbuffer C : register(b0)
int a = -1;
};
-float4 main() : SV_Position
+float4 main() : SV_POSITION
{
- return a;
+ return 0;
+// return a;
}
diff --git a/tests/bugs/do-loop.hlsl b/tests/bugs/do-loop.hlsl
index de98a9765..e293258b2 100644
--- a/tests/bugs/do-loop.hlsl
+++ b/tests/bugs/do-loop.hlsl
@@ -1,4 +1,4 @@
-//TEST_DISABLED:COMPARE_HLSL: -profile vs_5_0 -target dxbc-assembly
+//TEST_DISABLED:COMPARE_HLSL: -profile vs_5_0
// Check output for `do` loops
diff --git a/tests/bugs/gh-171.slang b/tests/bugs/gh-171.slang
index 1df82501e..647f6a6a2 100644
--- a/tests/bugs/gh-171.slang
+++ b/tests/bugs/gh-171.slang
@@ -1,4 +1,4 @@
-//TEST:COMPARE_HLSL: -profile ps_5_0 -entry main -target dxbc-assembly -split-mixed-types
+//TEST:COMPARE_HLSL: -profile ps_5_0 -entry main
// Make sure we don't crash when desugaring resources
// in structs when a `cbuffer` only contains resources.
@@ -17,12 +17,12 @@ float4 main(float2 uv: UV) : SV_Target
#else
-Texture2D SLANG_parameterGroup_C_t : register(t0);
-SamplerState SLANG_parameterGroup_C_s : register(s0);
+Texture2D C_t_0 : register(t0);
+SamplerState C_s_0 : register(s0);
-float4 main(float2 uv: UV) : SV_Target
+float4 main(float2 uv: UV) : SV_TARGET
{
- return SLANG_parameterGroup_C_t.Sample(SLANG_parameterGroup_C_s, uv);
+ return C_t_0.Sample(C_s_0, uv);
}
#endif
diff --git a/tests/bugs/gh-172.slang b/tests/bugs/gh-172.slang
index f959c7ac6..dd5f4d47a 100644
--- a/tests/bugs/gh-172.slang
+++ b/tests/bugs/gh-172.slang
@@ -1,4 +1,4 @@
-//TEST:COMPARE_HLSL: -profile ps_5_0 -entry main -target dxbc-assembly -split-mixed-types
+//TEST:COMPARE_HLSL: -profile ps_5_0 -entry main
// Make sure we don't crash when desugaring resource in structs,
// when the user also declares multiple variables with a
@@ -21,19 +21,19 @@ float4 main() : SV_Target
#else
-cbuffer C : register(b0)
+cbuffer C_0 : register(b0)
{
- float2 uv;
+ float2 uv_0;
};
-Texture2D SLANG_parameterGroup_C_t0 : register(t0);
-Texture2D SLANG_parameterGroup_C_t1 : register(t1);
-SamplerState SLANG_parameterGroup_C_s : register(s0);
+Texture2D C_t0_0 : register(t0);
+Texture2D C_t1_0 : register(t1);
+SamplerState C_s_0 : register(s0);
-float4 main() : SV_Target
+float4 main() : SV_TARGET
{
- return SLANG_parameterGroup_C_t0.Sample(SLANG_parameterGroup_C_s, uv)
- + SLANG_parameterGroup_C_t1.Sample(SLANG_parameterGroup_C_s, uv);
+ return C_t0_0.Sample(C_s_0, uv_0)
+ + C_t1_0.Sample(C_s_0, uv_0);
}
#endif
diff --git a/tests/bugs/gh-295.hlsl b/tests/bugs/gh-295.hlsl
index 724684662..73b5f071e 100644
--- a/tests/bugs/gh-295.hlsl
+++ b/tests/bugs/gh-295.hlsl
@@ -1,4 +1,7 @@
-//TEST:COMPARE_HLSL: -profile vs_4_0 -target dxbc-assembly -no-checking
+// Disabled because Slang IR path is missing support for [fastopt]
+//TEST_IGNORE_FILE
+
+//TEST:COMPARE_HLSL: -profile vs_4_0
// Confirm that we pass through `[fastopt]` attributes
//
diff --git a/tests/bugs/gh-34.hlsl b/tests/bugs/gh-34.hlsl
index feaddb2ab..d43ea75d9 100644
--- a/tests/bugs/gh-34.hlsl
+++ b/tests/bugs/gh-34.hlsl
@@ -1,4 +1,4 @@
-//TEST:COMPARE_HLSL: -profile gs_5_0 -target dxbc-assembly -no-checking
+//TEST:COMPARE_HLSL: -profile gs_5_0
struct VS_OUT { float3 p : POSITION; };
@@ -6,8 +6,10 @@ struct VS_OUT { float3 p : POSITION; };
void main(InputPatch<VS_OUT, 3> input, inout TriangleStream<VS_OUT> outStream)
{
VS_OUT output;
- for (uint i = 0; i < 3; i += 1)
+ for (uint i = 0;; i += 1)
{
+ if(i < 3) {} else break;
+
output = input[i];
outStream.Append(output);
}
diff --git a/tests/bugs/implicit-conversion-binary-op.hlsl b/tests/bugs/implicit-conversion-binary-op.hlsl
index b9a558474..ac952902f 100644
--- a/tests/bugs/implicit-conversion-binary-op.hlsl
+++ b/tests/bugs/implicit-conversion-binary-op.hlsl
@@ -1,5 +1,5 @@
// implicit-conversion-binary-op.hlsl
-//TEST:COMPARE_HLSL: -profile ps_5_0 -target dxbc-assembly
+//TEST:COMPARE_HLSL: -profile ps_5_0
// Make sure that we can pick resolve the right overload
// to call when applying a binary operator to vectors
diff --git a/tests/bugs/import-overload-error.hlsl b/tests/bugs/import-overload-error.hlsl
index 328bb5b26..21b9a7c8f 100644
--- a/tests/bugs/import-overload-error.hlsl
+++ b/tests/bugs/import-overload-error.hlsl
@@ -1,4 +1,6 @@
-//TEST:COMPARE_HLSL: -profile cs_5_0 -target dxbc-assembly -no-checking
+// Disbaled because Slang should perform its own semantic checking now
+//TEST_IGNORE_FILE
+//TEST:COMPARE_HLSL: -profile cs_5_0
#ifdef __SLANG__
__import import_overload_error;
diff --git a/tests/bugs/matrix-mult.glsl b/tests/bugs/matrix-mult.glsl
index b427dee14..58285c541 100644
--- a/tests/bugs/matrix-mult.glsl
+++ b/tests/bugs/matrix-mult.glsl
@@ -1,4 +1,6 @@
-//TEST:COMPARE_GLSL:-profile glsl_fragment_450 -no-checking
+// Disabled because Slang compiler doesn't support GLSL as an input language
+//TEST_IGNORE_FILE
+//TEST:COMPARE_GLSL:-profile glsl_fragment_450
// matrix-mult.glsl
#version 450
diff --git a/tests/bugs/split-nested-types.hlsl b/tests/bugs/split-nested-types.hlsl
index dc8756ba2..577f64a75 100644
--- a/tests/bugs/split-nested-types.hlsl
+++ b/tests/bugs/split-nested-types.hlsl
@@ -1,4 +1,4 @@
-//TEST:COMPARE_HLSL:-no-mangle -profile ps_5_0 -target dxbc-assembly
+//TEST:COMPARE_HLSL:-no-mangle -profile ps_5_0
#ifdef __SLANG__
import split_nested_types;
diff --git a/tests/bugs/uav-write-index.hlsl b/tests/bugs/uav-write-index.hlsl
index 667c73e89..7dac172fa 100644
--- a/tests/bugs/uav-write-index.hlsl
+++ b/tests/bugs/uav-write-index.hlsl
@@ -1,4 +1,4 @@
-//TEST:COMPARE_HLSL: -profile cs_5_0 -target dxbc-assembly -no-checking
+//TEST:COMPARE_HLSL: -profile cs_5_0
// Make sure we handle complex UAV write patterns
@@ -6,6 +6,13 @@
// checking takes place:
#ifdef __SLANG__
__import empty;
+#else
+
+#define Bar Bar_0
+#define bar bar_0
+#define gUAV gUAV_0
+#define gUAV2 gUAV2_0
+
#endif
struct Bar
diff --git a/tests/bugs/vec-init-list.hlsl b/tests/bugs/vec-init-list.hlsl
index d957548e6..2f82a96b0 100644
--- a/tests/bugs/vec-init-list.hlsl
+++ b/tests/bugs/vec-init-list.hlsl
@@ -1,4 +1,4 @@
-//TEST:COMPARE_HLSL: -profile vs_5_0 -target dxbc-assembly
+//TEST:COMPARE_HLSL: -profile vs_5_0
// Check handling of initializer list for vector