radv: call nir_opt_algebraic_late() after lowering idiv for small bitsizes
This is needed because lower_idiv() introduces ineg again which we'll remove next. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>
This commit is contained in:
committed by
Marge Bot
parent
1ab9dd22a2
commit
987a0e6a67
@@ -3367,9 +3367,11 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline,
|
||||
}
|
||||
|
||||
if (nir_lower_bit_size(nir[i], lower_bit_size_callback, device)) {
|
||||
nir_lower_idiv(nir[i], nir_lower_idiv_precise);
|
||||
nir_opt_constant_folding(nir[i]);
|
||||
nir_opt_dce(nir[i]);
|
||||
// TODO: lower idiv beforehand
|
||||
if (nir_lower_idiv(nir[i], nir_lower_idiv_precise))
|
||||
NIR_PASS_V(nir[i], nir_opt_algebraic_late); /* needed for removing ineg again */
|
||||
NIR_PASS_V(nir[i], nir_opt_constant_folding);
|
||||
NIR_PASS_V(nir[i], nir_opt_dce);
|
||||
}
|
||||
|
||||
if (device->physical_device->rad_info.chip_class >= GFX8)
|
||||
|
||||
Reference in New Issue
Block a user