radeonsi: don't hang on shader compile failure
authorMarek Olšák <marek.olsak@amd.com>
Thu, 23 Mar 2017 23:17:23 +0000 (00:17 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 24 Mar 2017 17:25:05 +0000 (18:25 +0100)
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index 30856b08ac5151683b262d6a128a26561758a361..e1286b89333c6746489a2daef1c619d83c62a34c 100644 (file)
@@ -1246,7 +1246,7 @@ again:
                   memcmp(&current->key, key, sizeof(*key)) == 0 &&
                   (!current->is_optimized ||
                    util_queue_fence_is_signalled(&current->optimized_ready))))
-               return 0;
+               return current->compilation_failed ? -1 : 0;
 
        /* This must be done before the mutex is locked, because async GS
         * compilation calls this function too, and therefore must enter