nir/divergence: change nir_has_divergent_loop() to return true only for divergent breaks
The important information is whether a loop has a uniform number of iterations. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28627>
This commit is contained in:
@@ -1477,7 +1477,7 @@ nir_has_divergent_loop(nir_shader *shader)
|
||||
|
||||
foreach_list_typed(nir_cf_node, node, node, &func->body) {
|
||||
if (node->type == nir_cf_node_loop) {
|
||||
if (nir_loop_is_divergent(nir_cf_node_as_loop(node)))
|
||||
if (nir_cf_node_as_loop(node)->divergent_break)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user