Skip to content

Commit c440576

Browse files
authored
Enable fixed-size resource array tests for Clang (#364)
Since the support for fixed-size resource array has been implemented in Clang, these tests are now passing. Also removing -fvk-use-scalar-layout flag from the tests as they did not really need it (none of them are using structs). Related to llvm/llvm-project#133835.
1 parent 1f1c2b1 commit c440576

10 files changed

+22
-29
lines changed

test/Feature/ResourceArrays/array-global.test

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,16 @@ DescriptorSets:
118118
...
119119
#--- end
120120

121-
# Resource arrays are not yet implemented in Clang:
122-
# https://github.com/llvm/llvm-project/issues/133835
123-
# XFAIL: Clang
124-
125121
# Offload tests are missing support for resource arrays on Metal
126122
# https://github.com/llvm/offload-test-suite/issues/305
127123
# XFAIL: Metal
128124

125+
# https://github.com/llvm/llvm-project/issues/149561
126+
# XFAIL: Clang-Vulkan && !VK_KHR_shader_float_controls2
127+
129128
# RUN: split-file %s %t
130129
# RUN: %if !Vulkan %{ %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl %}
131-
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Fo %t.o %t/source.hlsl %}
130+
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -Fo %t.o %t/source.hlsl %}
132131
# RUN: %offloader %t/pipeline.yaml %t.o | FileCheck %s
133132

134133
// CHECK: Name: BufB

test/Feature/ResourceArrays/array-local.test

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,13 @@ DescriptorSets:
7979
...
8080
#--- end
8181

82-
# UNSUPPORTED: Clang
83-
8482
# Resource arrays are not yet supported on Metal
8583
# UNSUPPORTED: Metal
8684

85+
# https://github.com/llvm/llvm-project/issues/154669
86+
# XFAIL: Clang-Vulkan
87+
8788
# RUN: split-file %s %t
8889
# RUN: %if !Vulkan %{ %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl %}
89-
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Fo %t.o %t/source.hlsl %}
90+
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -Fo %t.o %t/source.hlsl %}
9091
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/ResourceArrays/array-local2.test

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ DescriptorSets:
7474
...
7575
#--- end
7676

77-
# UNSUPPORTED: Clang
78-
7977
# DXC-DirectX has a bug here because it does not create a local copy
8078
# of a function argument if the type is resource or resource array.
8179
https://github.com/microsoft/DirectXShaderCompiler/issues/7678
@@ -84,7 +82,10 @@ https://github.com/microsoft/DirectXShaderCompiler/issues/7678
8482
# Resource arrays are not yet supported on Metal
8583
# UNSUPPORTED: Metal
8684

85+
# https://github.com/llvm/llvm-project/issues/154669
86+
# XFAIL: Clang-Vulkan
87+
8788
# RUN: split-file %s %t
8889
# RUN: %if !Vulkan %{ %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl %}
89-
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Fo %t.o %t/source.hlsl %}
90+
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -Fo %t.o %t/source.hlsl %}
9091
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/ResourceArrays/array-of-constant-buffers.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ DescriptorSets:
7676

7777
# RUN: split-file %s %t
7878
# RUN: %if !Vulkan %{ %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl %}
79-
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Fo %t.o %t/source.hlsl %}
79+
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -Fo %t.o %t/source.hlsl %}
8080
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/ResourceArrays/multi-dim-array-global.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ DescriptorSets:
6969
...
7070
#--- end
7171

72-
# UNSUPPORTED: Clang
73-
7472
# Resource arrays are not yet supported on Metal
7573
# UNSUPPORTED: Metal
7674

test/Feature/ResourceArrays/multi-dim-array-local.test

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ DescriptorSets:
7676
...
7777
#--- end
7878

79-
# UNSUPPORTED: Clang
80-
8179
# Vulkan does not support multi-dimensional resource arrays
8280
# UNSUPPORTED: Vulkan
8381

@@ -86,5 +84,5 @@ DescriptorSets:
8684

8785
# RUN: split-file %s %t
8886
# RUN: %if !Vulkan %{ %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl %}
89-
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Fo %t.o %t/source.hlsl %}
87+
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -Fo %t.o %t/source.hlsl %}
9088
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/ResourceArrays/multi-dim-array-subset.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ DescriptorSets:
7575

7676
# RUN: split-file %s %t
7777
# RUN: %if !Vulkan %{ %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl %}
78-
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Fo %t.o %t/source.hlsl %}
78+
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -Fo %t.o %t/source.hlsl %}
7979
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/ResourceArrays/unbounded-array.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ DescriptorSets:
7070

7171
# RUN: split-file %s %t
7272
# RUN: %if !Vulkan %{ %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl %}
73-
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -fvk-use-scalar-layout -Fo %t.o %t/source.hlsl %}
73+
# RUN: %if Vulkan %{ %dxc_target -T cs_6_0 -fspv-target-env=vulkan1.3 -Fo %t.o %t/source.hlsl %}
7474
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/StructuredBuffer/inc_counter_array.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ DescriptorSets:
4646
# https://github.com/llvm/offload-test-suite/issues/305
4747
# XFAIL: Metal
4848

49-
# Resource arrays are not yet implemented in Clang:
50-
# https://github.com/llvm/llvm-project/issues/133835
51-
# XFAIL: Clang
49+
# https://github.com/llvm/llvm-project/issues/154407
50+
# XFAIL: Clang-DirectX
5251

5352
# WARP has an issue counters in resource arrays
5453
# Internal issue #58567630
55-
# XFAIL: DXC && DirectX-WARP
56-
54+
# XFAIL: DirectX-WARP
55+
#
5756
# Intel has an issue with counters in resource arrays
58-
# XFAIL: DXC && DirectX-Intel
57+
# https://github.com/llvm/offload-test-suite/issues/376
58+
# XFAIL: DirectX-Intel
5959

6060
# RUN: split-file %s %t
6161
# RUN: %dxc_target -T cs_6_0 -Fo %t.o %t/source.hlsl

test/Tools/Offloader/BufferExact-error-array.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ DescriptorSets:
4646
...
4747
#--- end
4848

49-
# Resource arrays are not yet implemented in Clang:
50-
# https://github.com/llvm/llvm-project/issues/133835
51-
# XFAIL: Clang
52-
5349
# Offload tests are missing support for resource arrays on Metal
5450
# https://github.com/llvm/offload-test-suite/issues/305
5551
# XFAIL: Metal

0 commit comments

Comments
 (0)