Skip to content

Commit ad34240

Browse files
LegNeatoFirestar99
authored andcommitted
Vulkan on windows via swiftshader
1 parent 42c4af6 commit ad34240

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
with:
3030
version: 1.4.309.0
3131
cache: true
32+
- if: ${{ runner.os == 'Windows' }}
33+
name: Install Vulkan Runtime with SwiftShader (Windows)
34+
uses: NcStudios/[email protected]
35+
with:
36+
sdkVersion: 1.4.309.0
3237
- if: ${{ runner.os == 'Linux' }}
3338
name: Linux - Install native dependencies
3439
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
@@ -88,6 +93,11 @@ jobs:
8893
with:
8994
version: 1.4.309.0
9095
cache: true
96+
- if: ${{ runner.os == 'Windows' }}
97+
name: Install Vulkan Runtime with SwiftShader (Windows)
98+
uses: NcStudios/[email protected]
99+
with:
100+
sdkVersion: 1.4.309.0
91101
- name: install rust-toolchain
92102
run: cargo version
93103
- name: cargo fetch --locked
@@ -129,6 +139,11 @@ jobs:
129139
with:
130140
version: 1.4.309.0
131141
cache: true
142+
- if: ${{ runner.os == 'Windows' }}
143+
name: Install Vulkan Runtime with SwiftShader (Windows)
144+
uses: NcStudios/[email protected]
145+
with:
146+
sdkVersion: 1.4.309.0
132147
- name: install rust-toolchain
133148
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
134149
- name: cargo fetch --locked
@@ -149,6 +164,11 @@ jobs:
149164
with:
150165
version: 1.4.309.0
151166
cache: true
167+
- if: ${{ runner.os == 'Windows' }}
168+
name: Install Vulkan Runtime with SwiftShader (Windows)
169+
uses: NcStudios/[email protected]
170+
with:
171+
sdkVersion: 1.4.309.0
152172
- if: ${{ runner.os == 'Linux' }}
153173
name: Linux - Install native dependencies
154174
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev

tests/difftests/bin/src/differ.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl NumericType for u32 {
150150
format!("{}", value)
151151
}
152152
fn can_have_relative_diff() -> bool {
153-
false
153+
true
154154
}
155155
fn as_f64(value: Self) -> f64 {
156156
value as f64
@@ -403,8 +403,8 @@ mod tests {
403403
_ => panic!("Expected numeric difference"),
404404
}
405405
match &diffs[0].relative_diff {
406-
DiffMagnitude::Incomparable => {}
407-
_ => panic!("Expected incomparable relative diff for U32"),
406+
DiffMagnitude::Numeric(val) => assert_eq!(*val, 3.0 / 5.0), // 3/5 = 0.6
407+
_ => panic!("Expected numeric relative diff for U32"),
408408
}
409409

410410
// Check second difference (index 3: 4 vs 7)

0 commit comments

Comments
 (0)