aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/nine_csmt_helper.h
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2017-03-15 22:45:03 +0100
committerAxel Davy <[email protected]>2017-03-26 23:10:38 +0200
commitbd85bb51c717a1858157c73adcb689e3986b2134 (patch)
tree7a9954aaaa694edf5cd64c25e865200a3f37f377 /src/gallium/state_trackers/nine/nine_csmt_helper.h
parent31f8b3babb5a2d685d6e8b8ed0a2120c7966e9b1 (diff)
st/nine: Resolve deadlock in surface/volume dtors when using csmt
Surfaces and Volumes can be freed in the worker thread. Without this patch, pending_uploads_counter could be non-zero in the Surfaces or Volumes dtor, leading to deadlock. Instead decrease properly the counter before releasing the item. Also avoid another potential deadlock if the item is not properly unlocked: Do not call UnlockRect which will cause deadlock, but free directly using the deadlock safe nine_context_get_pipe_multithread. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99246 CC: "17.0" <[email protected]> Signed-off-by: Axel Davy <[email protected]> Tested-by: James Harvey <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/nine_csmt_helper.h')
-rw-r--r--src/gallium/state_trackers/nine/nine_csmt_helper.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/nine_csmt_helper.h b/src/gallium/state_trackers/nine/nine_csmt_helper.h
index b0bbc054fc3..dc46bbd3a28 100644
--- a/src/gallium/state_trackers/nine/nine_csmt_helper.h
+++ b/src/gallium/state_trackers/nine/nine_csmt_helper.h
@@ -233,8 +233,8 @@ name##_rx( struct NineDevice9 *device, struct csmt_instruction *instr ) \
name##_priv( \
device ARGS_FOR_CALL( __VA_ARGS__ ) \
); \
- ARGS_FOR_UNBIND( __VA_ARGS__ ) \
p_atomic_dec(args->counter); \
+ ARGS_FOR_UNBIND( __VA_ARGS__ ) \
return 0; \
} \
\