d3d12: Use nir_test_mask instead of i2b(iand)

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17242>
This commit is contained in:
Konstantin Seurer 2022-06-24 21:34:09 +02:00 committed by Marge Bot
parent 4676b3d3dd
commit f237deb003
1 changed files with 1 additions and 3 deletions

View File

@ -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),