Repository: LiveSplit/livesplit-core
Pull request #244 (2019-09-13 05:13:28)

Update euc requirement from 0.3.0 to 0.4.1
Updates the requirements on [euc](https://github.com/zesterer/euc) to permit the latest version.
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/zesterer/euc/commits)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

CryZe: It seems like 0.4.1 regresses the visual quality a bit: https://github.com/zesterer/euc/issues/9
CryZe: Oof, looks like GitHub Actions does two workflows if the PR originates in the current repository.
CryZe: @dependabot rebase
dependabot-preview[bot]: Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request `@dependabot recreate`.

Patch:
diff --git a/Cargo.toml b/Cargo.toml
index 70f97c5..21dec9c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,7 +60,7 @@ rusttype = { version = "0.8.0", default-features = false, features = ["std"], op
 smallvec = { version = "0.6.9", default-features = false, optional = true }
 
 # Software Rendering
-euc = { version = "0.3.0", default-features = false, optional = true }
+euc = { version = "0.4.2", default-features = false, optional = true }
 vek = { version = "0.9.8", default-features = false, optional = true }
 
 [dev-dependencies]
diff --git a/src/rendering/software/mod.rs b/src/rendering/software/mod.rs
index 4379cb9..8141b7b 100644
--- a/src/rendering/software/mod.rs
+++ b/src/rendering/software/mod.rs
@@ -121,6 +121,11 @@ impl Target for AlphaBlended {
     }
 
     unsafe fn set(&mut self, pos: [usize; 2], src: Self::Item) {
+        debug_assert!(!src.r.is_nan());
+        debug_assert!(!src.g.is_nan());
+        debug_assert!(!src.b.is_nan());
+        debug_assert!(!src.a.is_nan());
+
         let dst = self.0.get(pos);
         self.0.set(
             pos,
@@ -185,7 +190,7 @@ impl Pipeline for MyPipeline<'_> {
     type VsOut = VsOut;
     type Pixel = Rgba<f32>;
 
-    fn vert(&self, vertex: &Self::Vertex) -> ([f32; 3], Self::VsOut) {
+    fn vert(&self, vertex: &Self::Vertex) -> ([f32; 4], Self::VsOut) {
         let left = self.color_tl * (1.0 - vertex.texcoord.y) + self.color_bl * vertex.texcoord.y;
         let right = self.color_tr * (1.0 - vertex.texcoord.y) + self.color_br * vertex.texcoord.y;
         let color = left * (1.0 - vertex.texcoord.x) + right * vertex.texcoord.x;
@@ -193,7 +198,7 @@ impl Pipeline for MyPipeline<'_> {
         let pos = Vec3::new(vertex.position.x, vertex.position.y, 1.0) * self.transform;
 
         (
-            [2.0 * pos.x - 1.0, -2.0 * pos.y + 1.0, 0.0],
+            [2.0 * pos.x - 1.0, -2.0 * pos.y + 1.0, 0.0, 1.0],
             VsOut {
                 color,
                 texcoord: vertex.texcoord,


Test patch:
diff --git a/src/rendering/software/tests.rs b/src/rendering/software/tests.rs
index 55f5954..eb6ec07 100644
--- a/src/rendering/software/tests.rs
+++ b/src/rendering/software/tests.rs
@@ -40,7 +40,7 @@ fn default() {
 
     let state = layout.state(&timer);
 
-    check(&state, 0x8ef1abb5, "default");
+    check(&state, 0x9df41392, "default");
 }
 
 #[test]
@@ -49,7 +49,7 @@ fn actual_split_file() {
     let timer = Timer::new(run).unwrap();
     let mut layout = Layout::default_layout();
 
-    check(&layout.state(&timer), 0x256841ba, "actual_split_file");
+    check(&layout.state(&timer), 0x81de1cc3, "actual_split_file");
 }
 
 #[test]
@@ -58,7 +58,7 @@ fn wsplit() {
     let timer = Timer::new(run).unwrap();
     let mut layout = lsl("tests/layout_files/WSplit.lsl");
 
-    check_dims(&layout.state(&timer), [250, 300], 0x3a65a2fd, "wsplit");
+    check_dims(&layout.state(&timer), [250, 300], 0x5ba3dbea, "wsplit");
 }
 
 #[test]
@@ -74,9 +74,9 @@ fn all_components() {
 
     let state = layout.state(&timer);
 
-    check_dims(&state, [300, 800], 0xed488faa, "all_components");
+    check_dims(&state, [300, 800], 0x1f1af5d2, "all_components");
 
-    check_dims(&state, [150, 800], 0x5d3b1176, "all_components_thin");
+    check_dims(&state, [150, 800], 0x8954836d, "all_components_thin");
 }
 
 #[test]
@@ -96,7 +96,7 @@ fn score_split() {
     state.components.push(ComponentState::Timer(timer_state));
     state.components.push(prev_seg);
 
-    check_dims(&state, [300, 400], 0x2d9fac28, "score_split");
+    check_dims(&state, [300, 400], 0xc91afba7, "score_split");
 }
 
 #[test]
@@ -105,7 +105,7 @@ fn dark_layout() {
     let timer = Timer::new(run).unwrap();
     let mut layout = lsl("tests/layout_files/dark.lsl");
 
-    check(&layout.state(&timer), 0x8f774e74, "dark_layout");
+    check(&layout.state(&timer), 0xad57b961, "dark_layout");
 }
 
 #[test]
@@ -123,7 +123,7 @@ fn subsplits_layout() {
     check_dims(
         &layout.state(&timer),
         [300, 800],
-        0x71c18228,
+        0x205cdb95,
         "subsplits_layout",
     );
 }
@@ -146,7 +146,7 @@ fn display_two_rows() {
     check_dims(
         &layout.state(&timer),
         [200, 100],
-        0x5b0d2441,
+        0xab2400af,
         "display_two_rows",
     );
 }
@@ -169,7 +169,7 @@ fn single_line_title() {
     check_dims(
         &layout.state(&timer),
         [150, 30],
-        0x55ce6498,
+        0x9f92f324,
         "single_line_title",
     );
 }
@@ -200,7 +200,7 @@ fn horizontal() {
         &[Some(10.0), None, Some(20.0), Some(55.0)],
     );
 
-    check_dims(&layout.state(&timer), [1500, 40], 0x32fb0bcf, "horizontal");
+    check_dims(&layout.state(&timer), [1500, 40], 0x50a38160, "horizontal");
 }
 
 fn check(state: &LayoutState, expected_checksum: u32, name: &str) {