1º Include support for cpudetection 2º Fix mmx not mmxext 3º include support for simd in arm I test in same computer with / without sse2 and ssse3 and run fine See the code for validate: pixman/pixman-x86.c - line 232 ---------------------------------------------------------- #ifdef USE_X86_MMX if (!_pixman_disabled ("mmx") && have_feature (MMX_BITS)) imp = _pixman_implementation_create_mmx (imp); #endif #ifdef USE_SSE2 if (!_pixman_disabled ("sse2") && have_feature (SSE2_BITS)) imp = _pixman_implementation_create_sse2 (imp); #endif #ifdef USE_SSSE3 if (!_pixman_disabled ("ssse3") && have_feature (SSSE3_BITS)) imp = _pixman_implementation_create_ssse3 (imp); #endif pixman/pixman-arm.c - line 209 ---------------------------------------------------------- #ifdef USE_ARM_SIMD if (!_pixman_disabled ("arm-simd") && have_feature (ARM_V6)) imp = _pixman_implementation_create_arm_simd (imp); #endif #ifdef USE_ARM_IWMMXT if (!_pixman_disabled ("arm-iwmmxt") && have_feature (ARM_IWMMXT)) imp = _pixman_implementation_create_mmx (imp); #endif #ifdef USE_ARM_NEON if (!_pixman_disabled ("arm-neon") && have_feature (ARM_NEON)) imp = _pixman_implementation_create_arm_neon (imp); #endif pixman/pixman-mips.c - line 77 ---------------------------------------------------------- #ifdef USE_LOONGSON_MMI /* I really don't know if some Loongson CPUs don't have MMI. */ if (!_pixman_disabled ("loongson-mmi") && have_feature ("Loongson")) imp = _pixman_implementation_create_mmx (imp); #endif pixman/pixman-ppc.c - line 149 ---------------------------------------------------------- #ifdef USE_VMX if (!_pixman_disabled ("vmx") && pixman_have_vmx ()) imp = _pixman_implementation_create_vmx (imp); #endif TODO * Support dspr2 in mips * Use of cpu_flags arm,ppc and mips Reproducible: Always
Created attachment 397014 [details, diff] pixman-0.32.6.diff
USE=cpudetection is commonly used to denote run-time CPU detection, not compile-time CPU detection. The entire exercise seems to mirror what CPU_FLAGS is doing already.
Yes, the pixman check in run-time CPU detection see the code in pixman/pixman-x86.c line 163 /* Get feature bits */ pixman_cpuid (0x01, &a, &b, &c, &d); if (d & (1 << 15)) features |= X86_CMOV; if (d & (1 << 23)) features |= X86_MMX; if (d & (1 << 25)) features |= X86_SSE; if (d & (1 << 26)) features |= X86_SSE2; if (c & (1 << 9)) features |= X86_SSSE3;
(In reply to INODE64 Sistemas from comment #0) > 1º Include support for cpudetection Pixman supports CPU detection. Adding a cpudetection flag would do... what exactly? There's not a configure knob to disable cpudetection. > 2º Fix mmx not mmxext No, it's supposed to be mmxext. > 3º include support for simd in arm I'm not sure it's worth it. The overwhelming majority of Gentoo ARM systems are v6+. Maybe some explanation why you think these should be done would help?
(In reply to Matt Turner from comment #4) > (In reply to INODE64 Sistemas from comment #0) > > 3º include support for simd in arm > > I'm not sure it's worth it. The overwhelming majority of Gentoo ARM systems > are v6+. I should note that ffmpeg does have an armv6 flag, so adding one to pixman wouldn't be covering new ground.
(In reply to Matt Turner from comment #4) > (In reply to INODE64 Sistemas from comment #0) > > 1º Include support for cpudetection > > Pixman supports CPU detection. Adding a cpudetection flag would do... what > exactly? There's not a configure knob to disable cpudetection. > > > 2º Fix mmx not mmxext > > No, it's supposed to be mmxext. > > > 3º include support for simd in arm > > I'm not sure it's worth it. The overwhelming majority of Gentoo ARM systems > are v6+. > > Maybe some explanation why you think these should be done would help? The pixman check in run-time the features of CPU (sse, mmx and ssse3) If you enable this in configure, pixman always this feature before run the appropriate optimize code mmxext is not used only mmx in pixman
Created attachment 397082 [details, diff] pixman-0.32.6.ebuild.diff Change simd for armv6
(In reply to INODE64 Sistemas from comment #6) > mmxext is not used only mmx in pixman You're arguing with the person who made pixman use mmxext instructions. The thing you're missing is that three lines above #ifdef USE_X86_MMX if (!_pixman_disabled ("mmx") && have_feature (MMX_BITS)) imp = _pixman_implementation_create_mmx (imp); #endif is #define MMX_BITS (X86_MMX | X86_MMX_EXTENSIONS)
Comment on attachment 397082 [details, diff] pixman-0.32.6.ebuild.diff Thanks for the patch, but this is too much. We don't need to protect all of these flags with use {mips,ppc,arm,...}. The flags are masked by the profiles, so they cannot be set on the wrong platforms. If you want to send a patch to simply add an armv6 use flag (and to add <flag name="armv6">Enables optimizations for armv6 processors.</flag> to metadata.xml) I'd happily accept that.
(In reply to Matt Turner from comment #8) > (In reply to INODE64 Sistemas from comment #6) > > mmxext is not used only mmx in pixman > > You're arguing with the person who made pixman use mmxext instructions. > > The thing you're missing is that three lines above > > #ifdef USE_X86_MMX > if (!_pixman_disabled ("mmx") && have_feature (MMX_BITS)) > imp = _pixman_implementation_create_mmx (imp); > #endif > > is > > #define MMX_BITS (X86_MMX | X86_MMX_EXTENSIONS) | is or. X86_MMX or X86_MMX_EXTENSIONS MMX_EXTENSIONS include cpu instructions of MMX too in the code no use exclusive MMX_EXTENSIONS
(In reply to Matt Turner from comment #9) > Comment on attachment 397082 [details, diff] [details, diff] > pixman-0.32.6.ebuild.diff > > Thanks for the patch, but this is too much. We don't need to protect all of > these flags with use {mips,ppc,arm,...}. The flags are masked by the > profiles, so they cannot be set on the wrong platforms. > > If you want to send a patch to simply add an armv6 use flag (and to add > <flag name="armv6">Enables optimizations for armv6 processors.</flag> to > metadata.xml) I'd happily accept that. This flags are masked by arch. Other question is make syntax for each arch, similar to cpu_flags_x86 cpu_flags_arm_armv6 cpu_flags_arm_neon . . .
(In reply to INODE64 Sistemas from comment #10) > (In reply to Matt Turner from comment #8) > > (In reply to INODE64 Sistemas from comment #6) > > > mmxext is not used only mmx in pixman > > > > You're arguing with the person who made pixman use mmxext instructions. > > > > The thing you're missing is that three lines above > > > > #ifdef USE_X86_MMX > > if (!_pixman_disabled ("mmx") && have_feature (MMX_BITS)) > > imp = _pixman_implementation_create_mmx (imp); > > #endif > > > > is > > > > #define MMX_BITS (X86_MMX | X86_MMX_EXTENSIONS) > > | is or. X86_MMX or X86_MMX_EXTENSIONS > > MMX_EXTENSIONS include cpu instructions of MMX too > > in the code no use exclusive MMX_EXTENSIONS Are you serious? Read the code, specifically have_feature(). I'm not going to argue with you about this other than to point you to http://cgit.freedesktop.org/pixman/commit/?id=14208344964f341a7b4a704b05cf4804c23792e9 http://cgit.freedesktop.org/pixman/commit/?id=84221f4c1687b8ea14e9cbdc78b2ba7258e62c9e
(In reply to INODE64 Sistemas from comment #11) > (In reply to Matt Turner from comment #9) > > Comment on attachment 397082 [details, diff] [details, diff] [details, diff] > > pixman-0.32.6.ebuild.diff > > > > Thanks for the patch, but this is too much. We don't need to protect all of > > these flags with use {mips,ppc,arm,...}. The flags are masked by the > > profiles, so they cannot be set on the wrong platforms. > > > > If you want to send a patch to simply add an armv6 use flag (and to add > > <flag name="armv6">Enables optimizations for armv6 processors.</flag> to > > metadata.xml) I'd happily accept that. > > This flags are masked by arch. I'm not sure if you're agreeing with me or... > Other question is make syntax for each arch, similar to cpu_flags_x86 > > cpu_flags_arm_armv6 > cpu_flags_arm_neon > . > . > . That needs to happen outside of pixman first, like CPU_FLAGS_X86 did.
(In reply to Matt Turner from comment #12) > (In reply to INODE64 Sistemas from comment #10) > > (In reply to Matt Turner from comment #8) > > > (In reply to INODE64 Sistemas from comment #6) > > > > mmxext is not used only mmx in pixman > > > > > > You're arguing with the person who made pixman use mmxext instructions. > > > > > > The thing you're missing is that three lines above > > > > > > #ifdef USE_X86_MMX > > > if (!_pixman_disabled ("mmx") && have_feature (MMX_BITS)) > > > imp = _pixman_implementation_create_mmx (imp); > > > #endif > > > > > > is > > > > > > #define MMX_BITS (X86_MMX | X86_MMX_EXTENSIONS) > > > > | is or. X86_MMX or X86_MMX_EXTENSIONS > > > > MMX_EXTENSIONS include cpu instructions of MMX too > > > > in the code no use exclusive MMX_EXTENSIONS > > Are you serious? Read the code, specifically have_feature(). I'm not going > to argue with you about this other than to point you to > > http://cgit.freedesktop.org/pixman/commit/ > ?id=14208344964f341a7b4a704b05cf4804c23792e9 > > http://cgit.freedesktop.org/pixman/commit/ > ?id=84221f4c1687b8ea14e9cbdc78b2ba7258e62c9e Well according to SSE2 code is also would need MMX, MMXEXT and SSE, the INTEL processors do not support AMD MMXEXT only
(In reply to INODE64 Sistemas from comment #14) > Well according to SSE2 code is also would need MMX, MMXEXT and SSE, the > INTEL processors do not support AMD MMXEXT only No again. The value of X86_SSE, which gets set if the SSE CPUID bit is set, is > X86_SSE = (1 << 2) | X86_MMX_EXTENSIONS, I'll plan to add an armv6 flag to the next version bump of pixman. Thanks for pointing that out. I'm going to mark the bug UPSTREAM (because there's not a "WILLFIX") so I don't have to think about arguing with you anymore.
Created attachment 397680 [details, diff] pixman-0.32.6.ebuild.diff Sorry, you're right is MMXEXT:-( I filtered the mmx and sse flags for intefieran in her process of automatic processor at runtime