Module: Mesa Branch: staging/20.1 Commit: a3506fe7ee13bdaa0b81688561bd81cec7cf8171 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a3506fe7ee13bdaa0b81688561bd81cec7cf8171
Author: Erik Faye-Lund <[email protected]> Date: Fri May 15 12:05:11 2020 +0200 zink: implement i2b1 This shuold really have been implemented before starting to use these, but I guess I missed them. Fixes a crash when starting a game in Warzone 2100. Fixes: 7f6a491eec0 ("zink: lower b2b to b2i") Reviewed-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5053> (cherry picked from commit 09ac0350fdc97a746342c63deb4e9b626959d47a) --- .pick_status.json | 2 +- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 414bb4d834e..90e292736ba 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -400,7 +400,7 @@ "description": "zink: implement i2b1", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "7f6a491eec02d6c141e2b4849a3ba924926a482a" }, diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index aaf722ad394..e609a08caf6 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -1020,6 +1020,13 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu) nir_src_bit_size(alu->src[0].src), num_components, 0)); break; + case nir_op_i2b1: + assert(nir_op_infos[alu->op].num_inputs == 1); + result = emit_binop(ctx, SpvOpINotEqual, dest_type, src[0], + get_ivec_constant(ctx, + nir_src_bit_size(alu->src[0].src), + num_components, 0)); + break; #define BINOP(nir_op, spirv_op) \ _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
