aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/vertexshader9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2018-09-09 12:47:16 +0200
committerAxel Davy <[email protected]>2018-09-25 22:05:24 +0200
commitfcbb00a50216a7b106f8957b1048bbe19b97d986 (patch)
treec048a7abfe65a9eea398929c9bb5f54adba0b77c /src/gallium/state_trackers/nine/vertexshader9.c
parente83b15cba0ef2712c51ee7b5049e364853ff3707 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/vertexshader9.c')
-rw-r--r--src/gallium/state_trackers/nine/vertexshader9.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/vertexshader9.c b/src/gallium/state_trackers/nine/vertexshader9.c
index a4228af157e..f104a9ad134 100644
--- a/src/gallium/state_trackers/nine/vertexshader9.c
+++ b/src/gallium/state_trackers/nine/vertexshader9.c
@@ -262,5 +262,9 @@ NineVertexShader9_new( struct NineDevice9 *pDevice,
struct NineVertexShader9 **ppOut,
const DWORD *pFunction, void *cso )
{
- NINE_DEVICE_CHILD_NEW(VertexShader9, ppOut, pDevice, pFunction, cso);
+ if (cso) {
+ NINE_DEVICE_CHILD_BIND_NEW(VertexShader9, ppOut, pDevice, pFunction, cso);
+ } else {
+ NINE_DEVICE_CHILD_NEW(VertexShader9, ppOut, pDevice, pFunction, cso);
+ }
}