diff options
author | Marek Olšák <[email protected]> | 2017-05-31 18:02:54 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-07 18:43:42 +0200 |
commit | 38bd468a78b149c2cb1d105715231e7241d1dc5c (patch) | |
tree | 3275574de6fbad00f71514d6c9a63864d46ee571 /src/gallium/drivers/radeonsi/si_compute.c | |
parent | 33e507ec23db3778294b75a1485021d2a35b0a22 (diff) |
radeonsi: drop unfinished shader compilations when destroying shaders
If we enqueue too many jobs and destroy the GL context, it may take
several seconds before the jobs finish. Just drop them instead.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_compute.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 4c980668d35..0338b8a1234 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -860,7 +860,8 @@ static void si_delete_compute_state(struct pipe_context *ctx, void* state){ } if (program->ir_type == PIPE_SHADER_IR_TGSI) { - util_queue_fence_wait(&program->ready); + util_queue_drop_job(&sctx->screen->shader_compiler_queue, + &program->ready); util_queue_fence_destroy(&program->ready); } |