[Mesa-dev] [PATCH 1/3] radeonsi: don't hang on shader compile failure

Marek Olšák maraeo at gmail.com
Fri Mar 24 00:00:21 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

Cc: 17.0 <mesa-stable at lists.freedesktop.org>
---
 src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 30856b0..e1286b8 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1239,21 +1239,21 @@ static int si_shader_select_with_key(struct si_screen *sscreen,
 
 again:
 	/* Check if we don't need to change anything.
 	 * This path is also used for most shaders that don't need multiple
 	 * variants, it will cost just a computation of the key and this
 	 * test. */
 	if (likely(current &&
 		   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
 	 * the mutex first.
 	 *
 	 * Only wait if we are in a draw call. Don't wait if we are
 	 * in a compiler thread.
 	 */
 	if (thread_index < 0)
 		util_queue_fence_wait(&sel->ready);
-- 
2.7.4



More information about the mesa-dev mailing list