Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-12 Thread Roland Scheidegger
Am 12.03.19 um 18:34 schrieb Eric Anholt: > Ilia Mirkin writes: > >> I believe the distinction here is between initializing all the fields >> and using them individually (thus leaving the padding uninitialized), >> vs using the fields to create a structure to hash as a sequence of >> bytes. For

Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-12 Thread Eric Anholt
Ilia Mirkin writes: > I believe the distinction here is between initializing all the fields > and using them individually (thus leaving the padding uninitialized), > vs using the fields to create a structure to hash as a sequence of > bytes. For the latter, you really need all the memory

Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-12 Thread Ilia Mirkin
I believe the distinction here is between initializing all the fields and using them individually (thus leaving the padding uninitialized), vs using the fields to create a structure to hash as a sequence of bytes. For the latter, you really need all the memory initialized, not just the "valid"

Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-12 Thread Eric Anholt
Brian Paul writes: > On 03/11/2019 04:47 PM, Eric Anholt wrote: >> Brian Paul writes: >> >>> Since the compiler may not zero-out padding in the object. >>> Add a couple comments about this to prevent misunderstandings in >>> the future. >>> >>> Fixes: 67d96816ff5 ("st/mesa: move, clean-up

Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-11 Thread Brian Paul
On 03/11/2019 04:47 PM, Eric Anholt wrote: Brian Paul writes: Since the compiler may not zero-out padding in the object. Add a couple comments about this to prevent misunderstandings in the future. Fixes: 67d96816ff5 ("st/mesa: move, clean-up shader variant key decls/inits") ---

Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-11 Thread Eric Anholt
Brian Paul writes: > Since the compiler may not zero-out padding in the object. > Add a couple comments about this to prevent misunderstandings in > the future. > > Fixes: 67d96816ff5 ("st/mesa: move, clean-up shader variant key decls/inits") > --- > src/mesa/state_tracker/st_atom_shader.c | 9

Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-08 Thread Neha Bhende
Reviewed-by: Neha Bhende Regards, Neha From: mesa-dev on behalf of Brian Paul Sent: Friday, March 8, 2019 9:14 AM To: mesa-dev@lists.freedesktop.org Cc: Neha Bhende Subject: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated

Re: [Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-08 Thread Roland Scheidegger
Reviewed-by: Roland Scheidegger Am 08.03.19 um 18:14 schrieb Brian Paul: > Since the compiler may not zero-out padding in the object. > Add a couple comments about this to prevent misunderstandings in > the future. > > Fixes: 67d96816ff5 ("st/mesa: move, clean-up shader variant key

[Mesa-dev] [PATCH] st/mesa: init hash keys with memset(), not designated initializers

2019-03-08 Thread Brian Paul
Since the compiler may not zero-out padding in the object. Add a couple comments about this to prevent misunderstandings in the future. Fixes: 67d96816ff5 ("st/mesa: move, clean-up shader variant key decls/inits") --- src/mesa/state_tracker/st_atom_shader.c | 9 +++--