summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-01 19:02:16 +0200
committerMarek Olšák <[email protected]>2017-06-07 18:43:42 +0200
commit3effce4fb062371dd6c08fe57b0c12a20cf7af71 (patch)
tree3a1b94dd0c7ed65eec1b166feb04ad17a40cf42d /src/gallium/drivers/radeonsi
parentb5bc826ead940211982e38c1130055d17b6cd28d (diff)
radeonsi/gfx9: prevent a race when the previous shader's main part is missing
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 727bf4bee9a..08d647b5a54 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1634,9 +1634,11 @@ again:
else
assert(0);
+ mtx_lock(&previous_stage_sel->mutex);
ok = si_check_missing_main_part(sscreen,
previous_stage_sel,
compiler_state, &shader1_key);
+ mtx_unlock(&previous_stage_sel->mutex);
} else {
ok = si_check_missing_main_part(sscreen, sel,
compiler_state, key);