radeonsi: take reference glsl types for compile threads
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 7 Aug 2019 15:03:37 +0000 (18:03 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 21 Aug 2019 07:44:10 +0000 (09:44 +0200)
commit8a2465e3f3fed685611bd5824e955c83c0197a0a
tree4d95728694c2b80e0ae48429ad5ab4b11f2543f0
parente4da8b9c331cc3ae1b86b3a7860231e202463db0
radeonsi: take reference glsl types for compile threads

An application quitting before the destroying its GL context and
binding a NULL context might still have a radeonsi compiler thread
running and potentially still accessing the types.

Therefore take a reference for the duration of the threads' lifetime.

v2: Only ref the glsl types, the builtins should be used by the time
    shader data gets to a gallium driver.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/gallium/drivers/radeonsi/si_pipe.c