st/mesa: fix crash in shader cache cased by race condition
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 23 Feb 2017 03:42:07 +0000 (14:42 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 23 Feb 2017 22:01:59 +0000 (09:01 +1100)
commitc24d0aaa9a197ccf7cbaa9154b840aed6397f6bd
treeffd65bbda66a0c8273b870b200b4ed8e5b10ce11
parent261092f7d4f3142760fcce98ccb63b4efd47cc48
st/mesa: fix crash in shader cache cased by race condition

If a thread doesn't load GLSL IR from cache but does load TGSI
from cache (that was created by another thread) than it will
crash due to expecting gl_program_parameter_list to have been
restored from the GLSL IR cache and not be null.

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
src/mesa/state_tracker/st_shader_cache.c