radeonsi: check the IR type before waiting for a compute compilation fence
authorMarek Olšák <marek.olsak@amd.com>
Mon, 20 Mar 2017 15:39:02 +0000 (16:39 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 20 Mar 2017 22:17:14 +0000 (23:17 +0100)
This should fix OpenCL getting stuck.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100288
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/radeonsi/si_compute.c

index ed02f4930f84ddbdd55fb8dd5bd018217519c368..19a9189e7392ca179d2698abfa91f72a0163f1d3 100644 (file)
@@ -746,7 +746,9 @@ static void si_launch_grid(
                sctx->b.flags |= SI_CONTEXT_PS_PARTIAL_FLUSH |
                                 SI_CONTEXT_CS_PARTIAL_FLUSH;
 
-       util_queue_fence_wait(&program->ready);
+       if (program->ir_type == PIPE_SHADER_IR_TGSI)
+               util_queue_fence_wait(&program->ready);
+
        si_decompress_compute_textures(sctx);
 
        /* Add buffer sizes for memory checking in need_cs_space. */