-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
path_geometry::tests::find_cubic_max_curvature_1 fails on i686 (no SSE) #62
Comments
i386 (to be clear that's not i686) afaik is not compliant with IEEE 754 which kinda means it's not "a valid Rust target" to some degree. |
Well... as long as Skia produces the same output then this is not a bug. All we can do is to disable this test on i386 targets. But PS: by the way, do this target supports SIMD to begin with? If not, then it's out of scope. While tiny-skia supports scalar fallback, using it without AVX (aka Haswell) is mostly pointless. |
Oh wait, I believe they are actually talking about i686 though, which does support IEEE-754, so I feel like that should work. |
Ideally we should have a compile time check for proper IEEE-754. While it's not easy, I'm striving to have reproducible output int tiny-skia. |
@jamessan Is there even a way I can reproduce this target locally? I can bootup live cd with Linux if needed. |
It should just be the Rust defines i686 as a minimum of "pentium4": Here |
That issue mentions only arm64 and amd64 being supported. This doesn't seem to be declared anywhere, so that people wanting to use tiny-skia know where it should be used. What would they use instead on other architectures? I was going to open a separate issue about tests failing on mipsel/mips64el, but it sounds like that might be considered out of scope too. |
@CryZe While All I know is that it works just fine on a modern hardware. At least amd64 and aarch64 are just fine. |
Alright, so I got it to reproduce by specifying |
@jamessan tiny-skia works on the same hardware where the original Skia works. That's all I can say.
|
@CryZe last time I've tried -sse2 rustc was not able to compile the code to begin with. I guess it was fixed since? Is there a way to check it during compilation? Or we can have a dedicated test that will always fail on such architectures. |
I'd honestly just live with the fact that it's less precise there (maybe compile out the problematic tests). In fact I use tiny-skia in my i586 tests as well and I simply allow for some more precision errors there: My Tests It's not wildly different, so it still produces reasonably close images. |
Then checking for |
Basically I propose to add: #[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
compile_error!("Your hardware is too old."); |
Why must it produce the same output on all targets? Different browsers don't render the exact same as the others either and it's "good enough" for the web. And as a user of tiny-skia I'm totally fine with that too, so if the user of the crate is fine with such slight differences, they should be able to make that decision imo. I'd honestly just update the README to strongly clarify which platforms are guaranteed to produce the correct results and which aren't. Also @jamessan I'm not sure what Debian is doing here is even correct. Removing features from a target is usually the "wrong thing to do" as the standard library is precompiled and uses those features. So while you may compile tiny-skia without SSE here, the standard library will still use it, meaning the executable won't work on a machine without SSE anyway. This is all under the assumption that Debian doesn't compile std itself the same way of course. |
Looks like Debian changes the i686 target to pentiumpro. As far as which architectures are supported, it doesn't particularly matter to me. :) I'm certainly not trying to impose work on anyone. If the builds fail, then that will naturally define which architectures in Debian will have projects that use tiny-skia. If that support broadens in the future, then it will automatically be handled as the builds stop failing. The only issue is when previously building architectures start failing. |
Also, going back to my comment about mips(64)el eariler, this is the test that fails, in case it's of interest.
|
@jamessan as for the mips bug, |
@CryZe tiny-skia must produce the same output on all platforms because it was written for Not to mention that there is still a chance to get a vastly different output, it just not happened yet. Honestly, I barely have time to work on my projects to begin with. The smaller the scope of each crate - the better for me. |
Encountered in Debian's build of 0.8.2. Also reproduces in 4983d28.
The text was updated successfully, but these errors were encountered: