Mesa (main): d3d12: Use nir_test_mask instead of i2b(iand)

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 30 18:29:38 UTC 2022


Module: Mesa
Branch: main
Commit: f237deb00354a8432eac79c5a80d4317920450ee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f237deb00354a8432eac79c5a80d4317920450ee

Author: Konstantin Seurer <konstantin.seurer at gmail.com>
Date:   Fri Jun 24 21:34:09 2022 +0200

d3d12: Use nir_test_mask instead of i2b(iand)

Signed-off-by: Konstantin Seurer <konstantin.seurer at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17242>

---

 src/gallium/drivers/d3d12/d3d12_nir_passes.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/gallium/drivers/d3d12/d3d12_nir_passes.c b/src/gallium/drivers/d3d12/d3d12_nir_passes.c
index ea34c123168..9dddadaf9ee 100644
--- a/src/gallium/drivers/d3d12/d3d12_nir_passes.c
+++ b/src/gallium/drivers/d3d12/d3d12_nir_passes.c
@@ -413,9 +413,7 @@ invert_depth_impl(nir_builder *b, struct invert_depth_state *state)
    nir_ssa_def *pos = nir_ssa_for_src(b, intr->src[1], 4);
 
    if (state->viewport_index) {
-      nir_push_if(b, nir_i2b1(b, nir_iand_imm(b,
-         nir_ishl(b, nir_imm_int(b, 1), state->viewport_index),
-         state->viewport_mask)));
+      nir_push_if(b, nir_test_mask(b, nir_ishl(b, nir_imm_int(b, 1), state->viewport_index), state->viewport_mask));
    }
    nir_ssa_def *def = nir_vec4(b,
                                nir_channel(b, pos, 0),



More information about the mesa-commit mailing list