spirv2dxil: Remove dead branches early during shader compilation
Apparently spiregg can produce not-taken branches that somehow try to access textures that aren't actually declared. These branches need to be trimmed before any texture lowering is done. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531>
This commit is contained in:
@@ -1173,6 +1173,8 @@ dxil_spirv_nir_passes(nir_shader *nir,
|
||||
}
|
||||
NIR_PASS(progress, nir, nir_lower_vars_to_ssa);
|
||||
NIR_PASS(progress, nir, nir_opt_algebraic);
|
||||
NIR_PASS(progress, nir, nir_opt_dead_cf);
|
||||
NIR_PASS(progress, nir, nir_opt_remove_phis);
|
||||
} while (progress);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user