[Pixman] Plan to release final development version before stable branch

2015-12-09 Thread Oded Gabbay
Hi All,

I'm planning to release a new pixman development version (0.33.6) on
12/16. Immediately after that, I'm going to create a new stable branch
- 0.34.

Once that happen, only fixes will be accepted to that branch until the
stable release sometime in late January. Regular development will
continue in master.

If you have some pending patches please shout.

Thanks,

 Oded
___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman


[Pixman] [PATCH] configure.ac: fix test for SSE2/SSSE3 assembler support

2015-12-09 Thread Oded Gabbay
From: Jonathan Gray 

This patch was originally sent to mesa but it applies to pixman as well.

Change the __m128i variables to be volatile so gcc 4.9 won't optimize
all of them out with -O1 or greater.  The _mm_set1_epi32/pinsrd calls
still get optimized out but now there is at least one SSE2/SSSE3
instruction generated via _mm_max_epu32/pmaxud.  When all of the
SSE2/SSSE3 instructions got optimized out the configure test would
incorrectly pass when the compiler supported the intrinsics and the
assembler didn't support the instructions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806
Signed-off-by: Jonathan Gray 
Reviewed-by: Emil Velikov 
Signed-off-by: Oded Gabbay 
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3a66909..6323b98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -430,7 +430,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 #include 
 #include 
 int main () {
-__m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
c = _mm_xor_si128 (a, b);
 return 0;
 }]])], have_sse2_intrinsics=yes)
@@ -474,7 +474,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 #include 
 #include 
 int main () {
-__m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
 c = _mm_maddubs_epi16 (a, b);
 return 0;
 }]])], have_ssse3_intrinsics=yes)
-- 
2.5.0

___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman


Re: [Pixman] [Mesa-stable] [PATCH] configure.ac: fix test for SSE4.1 assembler support

2015-12-09 Thread Oded Gabbay
On Wed, Dec 9, 2015 at 1:09 PM, Emil Velikov  wrote:
> On 9 December 2015 at 05:37, Jonathan Gray  wrote:
>> Change the __m128i variables to be volatile so gcc 4.9 won't optimise
>> all of them out with -O1 or greater.  The _mm_set1_epi32/pinsrd calls
>> still get optimised out but now there is at least one SSE4.1 instruction
>> generated via _mm_max_epu32/pmaxud.  When all of the sse4.1 instructions
>> got optimised out the configure test would incorrectly pass when the
>> compiler supported the intrinsics and the assembler didn't support the
>> instructions.
>>
> Must admit that I was not expecting that one. Looks like pixman (the
> inspiration for this check) is missing volatile as well. Does that one
> build/run fine on OpenBSD ?
>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806
>> Signed-off-by: Jonathan Gray 
>> Cc: "11.0 11.1" 
> Reviewed-by: Emil Velikov 
>
> I'll pick this in a couple of days (barring any objections).
>
> Thanks
> Emil

Adding pixman ML.
I must admit ignorance on this one.
I looked at configure.ac of pixman and I don't see any SSE4.1
reference, and AFAIK, we don't use those instructions (only SSE2 and
SSSE3).
Is the above patch relevant for those as well ? because the tests in
configure.ac does *not* contain volatile.

Oded
___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman


Re: [Pixman] [Mesa-stable] [PATCH] configure.ac: fix test for SSE4.1 assembler support

2015-12-09 Thread Oded Gabbay
On Wed, Dec 9, 2015 at 2:34 PM, Jonathan Gray  wrote:
> On Wed, Dec 09, 2015 at 01:39:30PM +0200, Oded Gabbay wrote:
>> On Wed, Dec 9, 2015 at 1:09 PM, Emil Velikov  
>> wrote:
>> > On 9 December 2015 at 05:37, Jonathan Gray  wrote:
>> >> Change the __m128i variables to be volatile so gcc 4.9 won't optimise
>> >> all of them out with -O1 or greater.  The _mm_set1_epi32/pinsrd calls
>> >> still get optimised out but now there is at least one SSE4.1 instruction
>> >> generated via _mm_max_epu32/pmaxud.  When all of the sse4.1 instructions
>> >> got optimised out the configure test would incorrectly pass when the
>> >> compiler supported the intrinsics and the assembler didn't support the
>> >> instructions.
>> >>
>> > Must admit that I was not expecting that one. Looks like pixman (the
>> > inspiration for this check) is missing volatile as well. Does that one
>> > build/run fine on OpenBSD ?
>> >
>> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806
>> >> Signed-off-by: Jonathan Gray 
>> >> Cc: "11.0 11.1" 
>> > Reviewed-by: Emil Velikov 
>> >
>> > I'll pick this in a couple of days (barring any objections).
>> >
>> > Thanks
>> > Emil
>>
>> Adding pixman ML.
>> I must admit ignorance on this one.
>> I looked at configure.ac of pixman and I don't see any SSE4.1
>> reference, and AFAIK, we don't use those instructions (only SSE2 and
>> SSSE3).
>> Is the above patch relevant for those as well ? because the tests in
>> configure.ac does *not* contain volatile.
>>
>> Oded
>
> It looks like this is indeed a problem in pixman as well with at least
> gcc 4.2 and 4.9.  Running the pixman sse2 test on amd64 I only
> see xmm register use and movdqa in the generated assembly with -O0.
>
> The pixman configure tests passes on OpenBSD but the toolchain
> recognises sse2 instructions just not sse 4.1.
>
> Introducing volatile to the pixman test stops the xmm/movdqa
> use from being optimised out.

I adapted the patch to pixman's configure.ac and sent it to the ML.
Jonathan, thanks for the patch.

Oded
___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman


Re: [Pixman] [PATCH] configure.ac: fix test for SSE2/SSSE3 assembler support

2015-12-09 Thread Oded Gabbay
On Wed, Dec 9, 2015 at 3:31 PM, Oded Gabbay  wrote:
> From: Jonathan Gray 
>
> This patch was originally sent to mesa but it applies to pixman as well.
>
> Change the __m128i variables to be volatile so gcc 4.9 won't optimize
> all of them out with -O1 or greater.  The _mm_set1_epi32/pinsrd calls
> still get optimized out but now there is at least one SSE2/SSSE3
> instruction generated via _mm_max_epu32/pmaxud.  When all of the
> SSE2/SSSE3 instructions got optimized out the configure test would
> incorrectly pass when the compiler supported the intrinsics and the
> assembler didn't support the instructions.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806
> Signed-off-by: Jonathan Gray 
> Reviewed-by: Emil Velikov 
> Signed-off-by: Oded Gabbay 
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 3a66909..6323b98 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -430,7 +430,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
>  #include 
>  #include 
>  int main () {
> -__m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
> +volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
> c = _mm_xor_si128 (a, b);
>  return 0;
>  }]])], have_sse2_intrinsics=yes)
> @@ -474,7 +474,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
>  #include 
>  #include 
>  int main () {
> -__m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
> +volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
>  c = _mm_maddubs_epi16 (a, b);
>  return 0;
>  }]])], have_ssse3_intrinsics=yes)
> --
> 2.5.0
>

I now noticed the commit message is a bit not aligned to pixman, so I
will fix it as follows:

Instead of:

The _mm_set1_epi32/pinsrd calls still get optimized out but now there
is at least one SSE2/SSSE3  instruction generated via
_mm_max_epu32/pmaxud.

I should write:

The _mm_set1_epi32/pinsrd calls still get optimized out but now there
is at least one SSE2/SSSE3 instruction generated via
_mm_xor_si128/_mm_maddubs_epi16 respectively.

Oded
___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman


Re: [Pixman] [Mesa-stable] [PATCH] configure.ac: fix test for SSE4.1 assembler support

2015-12-09 Thread Emil Velikov
On 9 December 2015 at 11:39, Oded Gabbay  wrote:
> On Wed, Dec 9, 2015 at 1:09 PM, Emil Velikov  wrote:
>> On 9 December 2015 at 05:37, Jonathan Gray  wrote:
>>> Change the __m128i variables to be volatile so gcc 4.9 won't optimise
>>> all of them out with -O1 or greater.  The _mm_set1_epi32/pinsrd calls
>>> still get optimised out but now there is at least one SSE4.1 instruction
>>> generated via _mm_max_epu32/pmaxud.  When all of the sse4.1 instructions
>>> got optimised out the configure test would incorrectly pass when the
>>> compiler supported the intrinsics and the assembler didn't support the
>>> instructions.
>>>
>> Must admit that I was not expecting that one. Looks like pixman (the
>> inspiration for this check) is missing volatile as well. Does that one
>> build/run fine on OpenBSD ?
>>
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806
>>> Signed-off-by: Jonathan Gray 
>>> Cc: "11.0 11.1" 
>> Reviewed-by: Emil Velikov 
>>
>> I'll pick this in a couple of days (barring any objections).
>>
>> Thanks
>> Emil
>
> Adding pixman ML.
> I must admit ignorance on this one.
> I looked at configure.ac of pixman and I don't see any SSE4.1
> reference, and AFAIK, we don't use those instructions (only SSE2 and
> SSSE3).
> Is the above patch relevant for those as well ? because the tests in
> configure.ac does *not* contain volatile.
>
True, there is no SSE4.1 detection in pixman but the logic should
still holds. .Unless ... it is exclusive to SSE4.1, which I rather
doubt. Unfortunately there is no easy way to get older GCC on Arch
otherwise I would have tried it.

The full patch for reference http://patchwork.freedesktop.org/patch/67449/

-Emil
___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman


Re: [Pixman] [Mesa-stable] [PATCH] configure.ac: fix test for SSE4.1 assembler support

2015-12-09 Thread Jonathan Gray
On Wed, Dec 09, 2015 at 01:39:30PM +0200, Oded Gabbay wrote:
> On Wed, Dec 9, 2015 at 1:09 PM, Emil Velikov  wrote:
> > On 9 December 2015 at 05:37, Jonathan Gray  wrote:
> >> Change the __m128i variables to be volatile so gcc 4.9 won't optimise
> >> all of them out with -O1 or greater.  The _mm_set1_epi32/pinsrd calls
> >> still get optimised out but now there is at least one SSE4.1 instruction
> >> generated via _mm_max_epu32/pmaxud.  When all of the sse4.1 instructions
> >> got optimised out the configure test would incorrectly pass when the
> >> compiler supported the intrinsics and the assembler didn't support the
> >> instructions.
> >>
> > Must admit that I was not expecting that one. Looks like pixman (the
> > inspiration for this check) is missing volatile as well. Does that one
> > build/run fine on OpenBSD ?
> >
> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806
> >> Signed-off-by: Jonathan Gray 
> >> Cc: "11.0 11.1" 
> > Reviewed-by: Emil Velikov 
> >
> > I'll pick this in a couple of days (barring any objections).
> >
> > Thanks
> > Emil
> 
> Adding pixman ML.
> I must admit ignorance on this one.
> I looked at configure.ac of pixman and I don't see any SSE4.1
> reference, and AFAIK, we don't use those instructions (only SSE2 and
> SSSE3).
> Is the above patch relevant for those as well ? because the tests in
> configure.ac does *not* contain volatile.
> 
> Oded

It looks like this is indeed a problem in pixman as well with at least
gcc 4.2 and 4.9.  Running the pixman sse2 test on amd64 I only
see xmm register use and movdqa in the generated assembly with -O0.

The pixman configure tests passes on OpenBSD but the toolchain
recognises sse2 instructions just not sse 4.1.

Introducing volatile to the pixman test stops the xmm/movdqa
use from being optimised out.
___
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman