ac/nir/nggc: Write undef to variables in non-repacked ES threads.
This helps the compiler generate a little bit more efficient code. Fossil DB stats on Sienna Cichlid with NGGC on: Totals from 4659 (3.62% of 128647) affected shaders: CodeSize: 7468320 -> 7404484 (-0.85%); split: -0.88%, +0.03% Instrs: 1423425 -> 1407454 (-1.12%); split: -1.16%, +0.03% Latency: 5250593 -> 5226163 (-0.47%); split: -0.47%, +0.00% InvThroughput: 739848 -> 733373 (-0.88%); split: -0.90%, +0.02% Copies: 200139 -> 190307 (-4.91%); split: -5.13%, +0.22% Branches: 87925 -> 85998 (-2.19%) Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13121>
This commit is contained in:
@@ -730,6 +730,12 @@ compact_vertices_after_culling(nir_builder *b,
|
||||
nir_store_var(b, repacked_arg_vars[i], arg_val, 0x1u);
|
||||
}
|
||||
}
|
||||
nir_push_else(b, if_packed_es_thread);
|
||||
{
|
||||
nir_store_var(b, position_value_var, nir_ssa_undef(b, 4, 32), 0xfu);
|
||||
for (unsigned i = 0; i < max_exported_args; ++i)
|
||||
nir_store_var(b, repacked_arg_vars[i], nir_ssa_undef(b, 1, 32), 0x1u);
|
||||
}
|
||||
nir_pop_if(b, if_packed_es_thread);
|
||||
|
||||
nir_if *if_gs_accepted = nir_push_if(b, nir_load_var(b, gs_accepted_var));
|
||||
|
Reference in New Issue
Block a user