Re: [Mesa-dev] [PATCH 2/2] Make shader refcounting atomic.

2016-11-07 Thread Timothy Arceri
On Sat, 2016-11-05 at 15:37 +0100, Steinar H. Gunderson wrote: > These were racy when using the same shaders (seemingly even from > different > program objects) on multiple theads sharing the same objects, leading > to > issues such as (excerpts from an apitrace dump from a real > application): >

[Mesa-dev] [PATCH 2/2] Make shader refcounting atomic.

2016-11-06 Thread Steinar H. Gunderson
These were racy when using the same shaders (seemingly even from different program objects) on multiple theads sharing the same objects, leading to issues such as (excerpts from an apitrace dump from a real application): 1097 @0 glCreateProgram() = 9 1099 @0 glAttachShader(program = 9, shader

Re: [Mesa-dev] [PATCH 2/2] Make shader refcounting atomic.

2016-11-06 Thread Steinar H. Gunderson
On Mon, Nov 07, 2016 at 08:42:18AM +1100, Timothy Arceri wrote: >> Interesting. So other code seemingly has done refcounting with non- >> atomics but with locking; those locks were just missing here. > I was trying to point you to the fact that locking is known to be > broken in some places in case

Re: [Mesa-dev] [PATCH 2/2] Make shader refcounting atomic.

2016-11-06 Thread Timothy Arceri
On Sun, 2016-11-06 at 12:17 +0100, Steinar H. Gunderson wrote: > On Sun, Nov 06, 2016 at 09:40:03AM +1100, Timothy Arceri wrote: > > > > https://lists.freedesktop.org/archives/mesa-dev/2016-October/132629 > > .html > > Interesting. So other code seemingly has done refcounting with non- > atomics

Re: [Mesa-dev] [PATCH 2/2] Make shader refcounting atomic.

2016-11-06 Thread Steinar H. Gunderson
On Sun, Nov 06, 2016 at 09:40:03AM +1100, Timothy Arceri wrote: > https://lists.freedesktop.org/archives/mesa-dev/2016-October/132629.html Interesting. So other code seemingly has done refcounting with non-atomics but with locking; those locks were just missing here. (I've skipped the finer point

Re: [Mesa-dev] [PATCH 2/2] Make shader refcounting atomic.

2016-11-05 Thread Timothy Arceri
On Sat, 2016-11-05 at 15:37 +0100, Steinar H. Gunderson wrote: > These were racy when using the same shaders (seemingly even from > different > program objects) on multiple theads sharing the same objects, leading > to > issues such as (excerpts from an apitrace dump from a real > application): I'

[Mesa-dev] [PATCH 2/2] Make shader refcounting atomic.

2016-11-05 Thread Steinar H. Gunderson
These were racy when using the same shaders (seemingly even from different program objects) on multiple theads sharing the same objects, leading to issues such as (excerpts from an apitrace dump from a real application): 1097 @0 glCreateProgram() = 9 1099 @0 glAttachShader(program = 9, shader