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

2017-03-23 Thread Samuel Pitoiset

Patches 1 & 2 are:

Reviewed-by: Samuel Pitoiset 

No clue about about 3.

On 03/24/2017 01:00 AM, Marek Olšák wrote:

From: Marek Olšák 

Cc: 17.0 
---
 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(>key, key, sizeof(*key)) == 0 &&
   (!current->is_optimized ||
util_queue_fence_is_signalled(>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(>ready);


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-03-23 Thread Marek Olšák
From: Marek Olšák 

Cc: 17.0 
---
 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(>key, key, sizeof(*key)) == 0 &&
   (!current->is_optimized ||
util_queue_fence_is_signalled(>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(>ready);
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev