Skip to content

Commit 00ecdc7

Browse files
authored
Merge branch 'main' into inbelic/static-sampler
2 parents 4a847a2 + 6987f6a commit 00ecdc7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+598
-74
lines changed

.github/workflows/pr-matrix.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
fail-fast: false
3535
matrix:
36-
SKU: [windows-amd]
36+
SKU: [windows-intel]
3737
TestTarget: [check-hlsl-warp-d3d12, check-hlsl-clang-warp-d3d12]
3838

3939
uses: ./.github/workflows/build-and-test-callable.yaml

.github/workflows/windows-amd-clang-warp-preview-d3d12.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ permissions:
66

77
on:
88
workflow_dispatch:
9-
schedule:
10-
- cron: '0 */2 * * *' # run every 2 hours
119

1210
jobs:
1311
Windows-D3D12-Warp-Clang:

.github/workflows/windows-amd-dxc-warp-preview-d3d12.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ permissions:
66

77
on:
88
workflow_dispatch:
9-
schedule:
10-
- cron: '0 */2 * * *' # run every 2 hours
119

1210
jobs:
1311
Windows-D3D12-Warp-DXC:

cmake/modules/Warp.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ function(setup_warp version)
2121
return()
2222
endif()
2323

24+
guess_nuget_arch(NUGET_ARCH)
25+
2426
if (version STREQUAL "LKG")
2527
if (NUGET_ARCH STREQUAL "arm64")
2628
set(version "1.0.14.2")
2729
else()
2830
set(version "1.0.10.1")
2931
endif()
30-
set(version_description "Latest Known Good (${version})")
32+
set(version_description "Latest Known Good for ${NUGET_ARCH} (${version})")
3133
else ()
3234
set(version_description "Custom (${version})")
3335
endif()
@@ -41,8 +43,6 @@ function(setup_warp version)
4143
file(DOWNLOAD "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/${version}/" ${WARP_ARCHIVE})
4244
endif()
4345

44-
guess_nuget_arch(NUGET_ARCH)
45-
4646
# This is all awfulness to work around the fact that the last known good WRAP
4747
# for x64 is before arm64 support was shipped via NuGet, and the packaging
4848
# changed and we just aren't allowed to have nice things.

docs/MoltenVK.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Enabling Vulkan on macOS with MoltenVK
2+
3+
> Note: MoltenVK uses SPIRV-Cross to convert SPIRV shaders to the Metal shading
4+
> language. This increases the mismatch between shader behavior, and as a result
5+
> many of the tests in this suite have known failures or behavior differences.
6+
7+
To enable Vulkan testing on macOS you first need to download and install the
8+
Vulkan SDK from [here](https://vulkan.lunarg.com).
9+
10+
By default the SDK installs into your home directory under
11+
`~/VulkanSDK/${SDK_Version}/macOS`. For CMake to find the SDK you either need to
12+
set the `VULKAN_SDK` environment variable to the macOS subdirectory of the
13+
VulkanSDK installation you wish to use. You also need to run `sudo
14+
~/VulkanSDK/${SDK_Version}/install_vulkan.py --force-install`, to install the
15+
development binaries into `/usr/local/...` so that launched applications can
16+
find them.
17+
18+
Once the SDK is installed and exposed to CMake, a clean configuration will
19+
detect Vulkan and the MoltenVK portability layer and enable the Vulkan test
20+
configurations.

lib/API/VK/Device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ class VKContext {
12671267
VkResult Res = vkCreateInstance(&CreateInfo, NULL, &Instance);
12681268
if (Res == VK_ERROR_INCOMPATIBLE_DRIVER)
12691269
return llvm::createStringError(std::errc::no_such_device,
1270-
"Cannot find a compatible Vulkan device");
1270+
"Cannot find a base Vulkan device");
12711271
if (Res)
12721272
return llvm::createStringError(std::errc::no_such_device,
12731273
"Unknown Vulkan initialization error: %d",

test/Feature/HLSLLib/D3DCOLORtoUBYTE4.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ DescriptorSets:
5252

5353

5454
# https://github.com/llvm/llvm-project/issues/149561
55-
# XFAIL: Clang-Vulkan
55+
# XFAIL: Clang-Vulkan && !VK_KHR_shader_float_controls2
5656

5757
# RUN: split-file %s %t
5858
# RUN: %dxc_target -HV 202x -T cs_6_5 -Fo %t.o %t/source.hlsl

test/Feature/HLSLLib/asdouble.32.test

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#--- source.hlsl
2+
StructuredBuffer<uint4> Low : register(t0);
3+
StructuredBuffer<uint4> High : register(t1);
4+
5+
RWStructuredBuffer<double4> Out : register(u2);
6+
7+
8+
[numthreads(1,1,1)]
9+
void main() {
10+
Out[0] = asdouble(Low[0], High[0]);
11+
Out[1] = double4(asdouble(Low[1].xyz, High[1].xyz), asdouble(Low[1].w, High[1].w));
12+
Out[2] = double4(asdouble(Low[2].xy, High[2].xy), asdouble(Low[2].zw, High[2].zw));
13+
Out[3] = asdouble(uint4(0, 0, 0, 3149642683), uint4(0, 1072693248, 3220176896, 2863311530));
14+
}
15+
//--- pipeline.yaml
16+
17+
---
18+
Shaders:
19+
- Stage: Compute
20+
Entry: main
21+
DispatchSize: [1, 1, 1]
22+
Buffers:
23+
- Name: Low
24+
Format: UInt32
25+
Stride: 16
26+
Data: [
27+
0X00000000, 0x00000000, 0x00000000, 0xBBBBBBBB,
28+
0xDDDDDDDD, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
29+
0xAAAAAAAA, 0x00000000, 0xCDCDCDCD, 0x55555555
30+
]
31+
# 0, 0, 0, 3149642683, 3722304989, 4294967295, 4294967295, 4294967295, 2863311530, 0, 3452816845, 1431655765
32+
- Name: High
33+
Format: UInt32
34+
Stride: 16
35+
Data: [
36+
0X00000000, 0x3FF00000, 0xBFF00000, 0xAAAAAAAA,
37+
0xCCCCCCCC, 0xEEEEEEEE, 0x7FEFFFFF, 0xFFEFFFFF,
38+
0x00000000, 0x40900000, 0xABABABAB, 0x3FD55555
39+
]
40+
# 0, 1072693248, 3220176896, 2863311530, 3435973836, 4008636142, 2146435071, 4293918719, 0, 1083179008, 2880154539, 1070945621
41+
- Name: Out
42+
Format: Float64
43+
Stride: 32
44+
ZeroInitSize: 128
45+
- Name: ExpectedOut
46+
Format: Hex64
47+
Stride: 32
48+
Data: [
49+
0X0000000000000000, 0x3FF0000000000000, 0xBFF0000000000000, 0xAAAAAAAABBBBBBBB,
50+
0xCCCCCCCCDDDDDDDD, 0xEEEEEEEEFFFFFFFF, 0x7FEFFFFFFFFFFFFF, 0xFFEFFFFFFFFFFFFF,
51+
0x00000000AAAAAAAA, 0x4090000000000000, 0xABABABABCDCDCDCD, 0x3FD5555555555555,
52+
0X0000000000000000, 0x3FF0000000000000, 0xBFF0000000000000, 0xAAAAAAAABBBBBBBB
53+
]
54+
# 0, 1.0, -1.0, -3.72066e-103, -9.25596e61, -2.28999e226, 1.79769e+308, -1.79769e+308, denorm, 1024.0, -2.53017e-98, 0.33333, 0, 1.0, -1.0, -3.72066e-103
55+
Results:
56+
- Result: Test
57+
Rule: BufferExact
58+
Actual: Out
59+
Expected: ExpectedOut
60+
DescriptorSets:
61+
- Resources:
62+
- Name: Low
63+
Kind: StructuredBuffer
64+
DirectXBinding:
65+
Register: 0
66+
Space: 0
67+
VulkanBinding:
68+
Binding: 0
69+
- Name: High
70+
Kind: StructuredBuffer
71+
DirectXBinding:
72+
Register: 1
73+
Space: 0
74+
VulkanBinding:
75+
Binding: 1
76+
- Name: Out
77+
Kind: RWStructuredBuffer
78+
DirectXBinding:
79+
Register: 2
80+
Space: 0
81+
VulkanBinding:
82+
Binding: 2
83+
#--- end
84+
85+
# https://github.com/llvm/llvm-project/issues/153513
86+
# XFAIL: Clang-Vulkan
87+
88+
# https://github.com/microsoft/DirectXShaderCompiler/issues/7699
89+
# XFAIL: DXC-Vulkan
90+
91+
# REQUIRES: Double
92+
# RUN: split-file %s %t
93+
# RUN: %dxc_target -HV 202x -T cs_6_5 -Fo %t.o %t/source.hlsl
94+
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/HLSLLib/asint.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ DescriptorSets:
136136
...
137137
#--- end
138138

139+
# https://github.com/llvm/llvm-project/issues/154214
140+
# XFAIL: Clang-Vulkan
141+
139142
# RUN: split-file %s %t
140143
# RUN: %dxc_target -T cs_6_5 -Fo %t.o %t/source.hlsl
141144
# RUN: %offloader %t/pipeline.yaml %t.o

test/Feature/HLSLLib/atan2.16.test

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#--- source.hlsl
2+
StructuredBuffer<half4> In0 : register(t0);
3+
StructuredBuffer<half4> In1 : register(t1);
4+
5+
RWStructuredBuffer<half4> Out0 : register(u2);
6+
7+
[numthreads(1,1,1)]
8+
void main() {
9+
Out0[0] = atan2(In0[0], In1[0]);
10+
Out0[1] = half4(atan2(In0[1].xyz, In1[1].xyz), atan2(In0[1].w, In1[1].w));
11+
Out0[2] = half4(atan2(In0[2].xy, In1[2].xy), atan2(In0[2].zw, In1[2].zw));
12+
Out0[3] = atan2(half4(10.0, -5.0, 20.25, 1), half4(2, -1, 0.25, 2));
13+
}
14+
//--- pipeline.yaml
15+
16+
---
17+
Shaders:
18+
- Stage: Compute
19+
Entry: main
20+
DispatchSize: [1, 1, 1]
21+
Buffers:
22+
- Name: In0
23+
Format: Float16
24+
Stride: 8
25+
Data: [0x4900, 0xc500, 0x4d10, 0x3c00, 0x4d20, 0x4fa0, 0x5110, 0x5250, 0xb400, 0xcd00, 0xcf80, 0x3400]
26+
# 10, -5, 20.25, 1, 20.5, 30.5, 40.5, 50.5, -0.25, -20, -30, 0.25
27+
- Name: In1
28+
Format: Float16
29+
Stride: 8
30+
Data: [0x4000, 0xbc00, 0x3400, 0x4000, 0x4580, 0x4680, 0x4780, 0x4840, 0xd640, 0xcd00, 0xcf80, 0x3400]
31+
# 2, -1, 0.25, 2, 5.5, 6.5, 7.5, 8.5, -100, -20, -30, 0.25
32+
- Name: Out0
33+
Format: Float16
34+
Stride: 8
35+
ZeroInitSize: 32
36+
- Name: ExpectedOut0
37+
Format: Float16
38+
Stride: 8
39+
Data: [ 0x3D7E, 0xBF12, 0x3E3C, 0x376B, 0x3D3C, 0x3D71, 0x3D8D, 0x3D9E, 0xC247, 0xC0B6, 0xC0B6, 0x3A48, 0x3D7E, 0xBF12, 0x3E3C, 0x376B ]
40+
# 1.3730469, -1.7675781, 1.5585938, 0.46362305, 1.3085938, 1.3603516, 1.3876953, 1.4042969, -3.1386719, -2.3554688, -2.3554688, 0.78515625, 1.3730469, -1.7675781, 1.5585938, 0.46362305
41+
Results:
42+
- Result: Test0
43+
Rule: BufferFloatEpsilon
44+
Epsilon: 0.003
45+
Actual: Out0
46+
Expected: ExpectedOut0
47+
DescriptorSets:
48+
- Resources:
49+
- Name: In0
50+
Kind: StructuredBuffer
51+
DirectXBinding:
52+
Register: 0
53+
Space: 0
54+
VulkanBinding:
55+
Binding: 0
56+
- Name: In1
57+
Kind: StructuredBuffer
58+
DirectXBinding:
59+
Register: 1
60+
Space: 0
61+
VulkanBinding:
62+
Binding: 1
63+
- Name: Out0
64+
Kind: RWStructuredBuffer
65+
DirectXBinding:
66+
Register: 2
67+
Space: 0
68+
VulkanBinding:
69+
Binding: 2
70+
#--- end
71+
72+
# https://github.com/microsoft/DirectXShaderCompiler/issues/7691
73+
# XFAIL: DXC-Vulkan
74+
75+
# REQUIRES: Half
76+
# RUN: split-file %s %t
77+
# RUN: %dxc_target -enable-16bit-types -HV 202x -T cs_6_5 -Fo %t.o %t/source.hlsl
78+
# RUN: %offloader %t/pipeline.yaml %t.o

0 commit comments

Comments
 (0)