diff options
author | Emma Anholt <emma@anholt.net> | 2022-04-15 11:17:50 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-04-19 18:45:29 +0000 |
commit | 7ba0c446074b0df1000c45e4253264ff9e6683a9 (patch) | |
tree | cc2141b26ee647643d89a46e318f03dc16e50b29 | |
parent | d60282f5d2cc6176210942cf29c5df1722ebb8ca (diff) |
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>
-rw-r--r-- | src/freedreno/vulkan/tu_shader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 2b11c78fa4d..1af0dbaa959 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -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; } |