turnip: Add nir_opt_conditional_discard.

We can easily do discard_if in the backend without control flow, but it
wasn't done in ir3 because the GL frontend already did it for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
This commit is contained in:
Emma Anholt 2022-04-15 11:17:50 -07:00 committed by Marge Bot
parent d60282f5d2
commit 7ba0c44607

View file

@ -132,6 +132,8 @@ tu_spirv_to_nir(struct tu_device *dev,
ir3_optimize_loop(dev->compiler, nir);
NIR_PASS_V(nir, nir_opt_conditional_discard);
return nir;
}