Re: [Mesa-dev] [PATCH] glsl: Add locking to builtin_builder singleton

2014-02-17 Thread Daniel Kurtz
On Tue, Feb 11, 2014 at 4:27 PM, Kenneth Graunke wrote: > On 02/07/2014 03:29 AM, Daniel Kurtz wrote: >> Consider a multithreaded program with two contexts A and B, and the >> following scenario: >> >> 1. Context A calls initialize(), which allocates mem_ctx and starts >>building built-ins. >>

Re: [Mesa-dev] [PATCH] glsl: Add locking to builtin_builder singleton

2014-02-16 Thread Kenneth Graunke
On 02/16/2014 10:33 PM, Daniel Kurtz wrote: > On Tue, Feb 11, 2014 at 4:27 PM, Kenneth Graunke > wrote: >> On 02/07/2014 03:29 AM, Daniel Kurtz wrote: >>> Consider a multithreaded program with two contexts A and B, and the >>> following scenario: >>> >>> 1. Context A calls initialize(), which all

Re: [Mesa-dev] [PATCH] glsl: Add locking to builtin_builder singleton

2014-02-11 Thread Kenneth Graunke
On 02/07/2014 03:29 AM, Daniel Kurtz wrote: > Consider a multithreaded program with two contexts A and B, and the > following scenario: > > 1. Context A calls initialize(), which allocates mem_ctx and starts >building built-ins. > 2. Context B calls initialize(), which sees mem_ctx != NULL and

[Mesa-dev] [PATCH] glsl: Add locking to builtin_builder singleton

2014-02-08 Thread Daniel Kurtz
Consider a multithreaded program with two contexts A and B, and the following scenario: 1. Context A calls initialize(), which allocates mem_ctx and starts building built-ins. 2. Context B calls initialize(), which sees mem_ctx != NULL and assumes everything is already set up. It returns. 3