mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nir: Do not eliminate dead writes to shared memory in called functions.
Fixes regressions in rusticl and c11_atomic OpenCL CTS test.
Fixes: e65c1473de ("nir: Eliminate dead writes to shared memory at the end of the program")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33807>
This commit is contained in:
parent
44110fe004
commit
5c1f61d900
1 changed files with 4 additions and 0 deletions
|
|
@ -115,6 +115,10 @@ ends_program(nir_block *block)
|
|||
if (block->cf_node.parent->type == nir_cf_node_loop)
|
||||
return false;
|
||||
|
||||
/* Avoid called functions */
|
||||
if (!nir_cf_node_get_function(&block->cf_node)->function->is_entrypoint)
|
||||
return false;
|
||||
|
||||
if (block->successors[0] == NULL) {
|
||||
/* This is the end block */
|
||||
assert(block->successors[1] == NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue