st/nine: Avoid RefToBind calls in ff
authorAxel Davy <davyaxel0@gmail.com>
Sun, 9 Sep 2018 10:47:16 +0000 (12:47 +0200)
committerAxel Davy <davyaxel0@gmail.com>
Tue, 25 Sep 2018 20:05:24 +0000 (22:05 +0200)
commitfcbb00a50216a7b106f8957b1048bbe19b97d986
treec048a7abfe65a9eea398929c9bb5f54adba0b77c
parente83b15cba0ef2712c51ee7b5049e364853ff3707
st/nine: Avoid RefToBind calls in ff

When using csmt, ff shader creation happens on the csmt
thread. Creating the shaders, then calling RefToBind causes
the device ref to be increased then decreased.

However the device dtor assumes than no work pending on the
csmt thread could increase the device ref, leading to hang.

The issue is avoided by creating the shaders with a bind
count directly.

Fixes: https://github.com/iXit/Mesa-3D/issues/295
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
src/gallium/state_trackers/nine/nine_ff.c
src/gallium/state_trackers/nine/pixelshader9.c
src/gallium/state_trackers/nine/vertexshader9.c