freedreno: Take a lock around shader variant creation.
authorEric Anholt <eric@anholt.net>
Thu, 25 Jul 2019 20:21:56 +0000 (13:21 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 29 Jul 2019 19:50:49 +0000 (12:50 -0700)
commit6f0521b78cfec6d461e17d293b9c90fc391cc795
treea60ded70fef7b888a70392eec25dd9d9cf476a62
parent6e3b220ad3c6b790ccba63e0ed742f3314c158ef
freedreno: Take a lock around shader variant creation.

Shaders are shared across contexts in gallium (part of making it so
that you get shader compile at link time, for shader-db and to reduce
compiles at draw time).  So, we need to protect from variant creation
for a shader from multiple threads at the same time.

Reviewed-by: Rob Clark <robdclark@gmail.com>
src/freedreno/ir3/ir3_shader.c
src/freedreno/ir3/ir3_shader.h