Re: [Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-07-02 Thread Davin McCall
On 02/07/15 14:58, Neil Roberts wrote: Davin McCall writes: I actually had thought about this, but technically, you can only use unions for type aliasing if you perform all accesses (that are not to the 'active' member) through the union. All the list processing code that iterates through all

Re: [Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-07-02 Thread Neil Roberts
Davin McCall writes: > I actually had thought about this, but technically, you can only use > unions for type aliasing if you perform all accesses (that are not to > the 'active' member) through the union. All the list processing code > that iterates through all the nodes including the tail senti

Re: [Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-07-01 Thread Davin McCall
On 01/07/15 16:46, Eero Tamminen wrote: Hi, On 06/30/2015 01:15 AM, Davin McCall wrote: This is the third iteration of a patch to resolve a strict aliasing problem in the exec_list structure. At the suggestion of Francisco Jerez this is a return to the original (v1) style of the patch, which r

Re: [Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-07-01 Thread Davin McCall
Re-post, where lines are hopefully not wrapped. Davin From b946157dcac2ca198ccf1981151525a1fc3ae39f Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sat, 27 Jun 2015 13:48:41 +0100 Subject: [PATCH] glsl: fix some strict aliasing issues in exec_list There is a problem in exec_list due to it d

Re: [Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-07-01 Thread Davin McCall
Hi Neil, On 01/07/15 17:08, Neil Roberts wrote: If we wanted to avoid growing the size of exec_list to four pointers instead of three, maybe we could store it in a union like below: struct exec_list { union { struct { struct exec_node head_sentinel; struct exec_no

Re: [Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-07-01 Thread Neil Roberts
Hi, If we wanted to avoid growing the size of exec_list to four pointers instead of three, maybe we could store it in a union like below: struct exec_list { union { struct { struct exec_node head_sentinel; struct exec_node *dummy_pointer_a; }; struct {

Re: [Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-07-01 Thread Eero Tamminen
Hi, On 06/30/2015 01:15 AM, Davin McCall wrote: This is the third iteration of a patch to resolve a strict aliasing problem in the exec_list structure. At the suggestion of Francisco Jerez this is a return to the original (v1) style of the patch, which replaces the three 'exec_node *' members i

[Mesa-dev] [PATCH v3] glsl: fix some strict aliasing issues in exec_list

2015-06-29 Thread Davin McCall
This is the third iteration of a patch to resolve a strict aliasing problem in the exec_list structure. At the suggestion of Francisco Jerez this is a return to the original (v1) style of the patch, which replaces the three 'exec_node *' members in the list with two 'struct exec_node' members.