r600: switch to NIR loop unrolling

Note the NIR unrolling code was already enabled but we bump the
iteration unroll count to match the GLSL IR limit as per the
comment about loop bugs.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16543>
This commit is contained in:
Timothy Arceri
2022-05-06 12:04:05 +10:00
committed by Marge Bot
parent dc2edb8f1d
commit b84e003079
2 changed files with 6 additions and 7 deletions

View File

@@ -642,6 +642,7 @@ static int r600_get_shader_param(struct pipe_screen* pscreen,
}
return ir;
}
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
case PIPE_SHADER_CAP_DROUND_SUPPORTED:
case PIPE_SHADER_CAP_DFRACEXP_DLDEXP_SUPPORTED:
case PIPE_SHADER_CAP_LDEXP_SUPPORTED:
@@ -663,12 +664,6 @@ static int r600_get_shader_param(struct pipe_screen* pscreen,
return EG_MAX_ATOMIC_BUFFERS;
}
return 0;
case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
/* due to a bug in the shader compiler, some loops hang
* if they are not unrolled, see:
* https://bugs.freedesktop.org/show_bug.cgi?id=86720
*/
return 255;
}
return 0;
}

View File

@@ -1339,7 +1339,11 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
.lower_insert_byte = true,
.lower_insert_word = true,
.lower_rotate = true,
.max_unroll_iterations = 32,
/* due to a bug in the shader compiler, some loops hang
* if they are not unrolled, see:
* https://bugs.freedesktop.org/show_bug.cgi?id=86720
*/
.max_unroll_iterations = 255,
.lower_interpolate_at = true,
.vectorize_io = true,
.has_umad24 = true,