Skip to content

Commit

Permalink
Merge branch 'main' into fix-553
Browse files Browse the repository at this point in the history
  • Loading branch information
s3bk authored Mar 5, 2024
2 parents b764586 + dc6034f commit 0410a54
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 35 deletions.
10 changes: 5 additions & 5 deletions content/src/outline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ impl Contour {
return Contour::from_rect(rect);
}
let radius = radius.min(rect.size() * 0.5);
let contol_point_offset = radius * QUARTER_ARC_CP_FROM_OUTSIDE;
let control_point_offset = radius * QUARTER_ARC_CP_FROM_OUTSIDE;

let mut contour = Contour::with_capacity(8);

// upper left corner
{
let p0 = rect.origin();
let p1 = p0 + contol_point_offset;
let p1 = p0 + control_point_offset;
let p2 = p0 + radius;
contour.push_endpoint(vec2f(p0.x(), p2.y()));
contour.push_cubic(
Expand All @@ -387,7 +387,7 @@ impl Contour {
// upper right
{
let p0 = rect.upper_right();
let p1 = p0 + contol_point_offset * vec2f(-1.0, 1.0);
let p1 = p0 + control_point_offset * vec2f(-1.0, 1.0);
let p2 = p0 + radius * vec2f(-1.0, 1.0);
contour.push_endpoint(vec2f(p2.x(), p0.y()));
contour.push_cubic(
Expand All @@ -400,7 +400,7 @@ impl Contour {
// lower right
{
let p0 = rect.lower_right();
let p1 = p0 + contol_point_offset * vec2f(-1.0, -1.0);
let p1 = p0 + control_point_offset * vec2f(-1.0, -1.0);
let p2 = p0 + radius * vec2f(-1.0, -1.0);
contour.push_endpoint(vec2f(p0.x(), p2.y()));
contour.push_cubic(
Expand All @@ -413,7 +413,7 @@ impl Contour {
// lower left
{
let p0 = rect.lower_left();
let p1 = p0 + contol_point_offset * vec2f(1.0, -1.0);
let p1 = p0 + control_point_offset * vec2f(1.0, -1.0);
let p2 = p0 + radius * vec2f(1.0, -1.0);
contour.push_endpoint(vec2f(p2.x(), p0.y()));
contour.push_cubic(
Expand Down
2 changes: 1 addition & 1 deletion shaders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ export SPIRVCROSS=spirv-cross.exe

Note: the Windows versions of `glslangValidator` and `spirv-cross` may change
the line endings of the generated output. Please take care to ensure that
unintended line ending changes aren't accidentally commited, for instance by
unintended line ending changes aren't accidentally committed, for instance by
[configuring Git to automatically handle line endings](https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings#global-settings-for-line-endings).
2 changes: 1 addition & 1 deletion simd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pathfinder_simd"
version = "0.5.2"
version = "0.5.3"
edition = "2018"
authors = ["Patrick Walton <[email protected]>"]
build = "build.rs"
Expand Down
28 changes: 1 addition & 27 deletions simd/src/arm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use std::arch::aarch64::{self, float32x2_t, float32x4_t, int32x2_t, int32x4_t};
use std::arch::aarch64::{uint32x2_t, uint32x4_t};
use std::intrinsics::simd::*;
use std::f32;
use std::fmt::{self, Debug, Formatter};
use std::mem;
Expand Down Expand Up @@ -869,33 +870,6 @@ impl Index<usize> for U32x4 {
}
}

// Intrinsics

extern "platform-intrinsic" {
fn simd_add<T>(x: T, y: T) -> T;
fn simd_div<T>(x: T, y: T) -> T;
fn simd_mul<T>(x: T, y: T) -> T;
fn simd_sub<T>(x: T, y: T) -> T;

fn simd_shr<T>(x: T, y: T) -> T;

fn simd_and<T>(x: T, y: T) -> T;
fn simd_or<T>(x: T, y: T) -> T;
fn simd_xor<T>(x: T, y: T) -> T;

fn simd_fmin<T>(x: T, y: T) -> T;
fn simd_fmax<T>(x: T, y: T) -> T;

fn simd_eq<T, U>(x: T, y: T) -> U;
fn simd_gt<T, U>(x: T, y: T) -> U;
fn simd_le<T, U>(x: T, y: T) -> U;
fn simd_lt<T, U>(x: T, y: T) -> U;

fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;

fn simd_cast<T, U>(x: T) -> U;
}

extern "C" {
#[link_name = "llvm.fabs.v2f32"]
fn fabs_v2f32(a: float32x2_t) -> float32x2_t;
Expand Down
3 changes: 2 additions & 1 deletion simd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(pf_rustc_nightly, feature(link_llvm_intrinsics, platform_intrinsics))]
#![cfg_attr(pf_rustc_nightly, allow(internal_features))]
#![cfg_attr(pf_rustc_nightly, feature(link_llvm_intrinsics, core_intrinsics))]
#![cfg_attr(all(target_arch = "aarch64", pf_rustc_nightly), feature(stdarch_arm_crc32))]
#![cfg_attr(pf_rustc_nightly, feature(simd_ffi))]

Expand Down

0 comments on commit 0410a54

Please sign in to comment.