mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 16:30:23 +01:00
ac/nir/ngg: Move divergence analysis call to analyze_shader_before_culling.
It actually belongs there. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21995>
This commit is contained in:
parent
a0a341f644
commit
0068dbee96
1 changed files with 3 additions and 2 deletions
|
|
@ -1057,6 +1057,9 @@ analyze_shader_before_culling_walk(nir_ssa_def *ssa,
|
|||
static void
|
||||
analyze_shader_before_culling(nir_shader *shader, lower_ngg_nogs_state *nogs_state)
|
||||
{
|
||||
/* We need divergence info for culling shaders. */
|
||||
nir_divergence_analysis(shader);
|
||||
|
||||
nir_foreach_function(func, shader) {
|
||||
nir_foreach_block(block, func->impl) {
|
||||
nir_foreach_instr(instr, block) {
|
||||
|
|
@ -2284,8 +2287,6 @@ ac_nir_lower_ngg_nogs(nir_shader *shader, const ac_nir_lower_ngg_options *option
|
|||
nir_builder_init(b, impl);
|
||||
|
||||
if (options->can_cull) {
|
||||
/* We need divergence info for culling shaders. */
|
||||
nir_divergence_analysis(shader);
|
||||
analyze_shader_before_culling(shader, &state);
|
||||
save_reusable_variables(b, &state);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue