diff --git a/.pick_status.json b/.pick_status.json index 37fbd456ae4..07047d70a5c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1408,7 +1408,7 @@ "description": "zink: Output PackHalf2x16 to uint not float", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, 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 e61a10743be..eed1fb57bdf 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 @@ -1742,7 +1742,13 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu) BUILTIN_UNOP(nir_op_ufind_msb, GLSLstd450FindUMsb) BUILTIN_UNOP(nir_op_find_lsb, GLSLstd450FindILsb) BUILTIN_UNOP(nir_op_ifind_msb, GLSLstd450FindSMsb) - BUILTIN_UNOPF(nir_op_pack_half_2x16, GLSLstd450PackHalf2x16) + + case nir_op_pack_half_2x16: + assert(nir_op_infos[alu->op].num_inputs == 1); + result = emit_builtin_unop(ctx, GLSLstd450PackHalf2x16, get_dest_type(ctx, &alu->dest.dest, nir_type_uint), src[0]); + force_float = true; + break; + BUILTIN_UNOPF(nir_op_unpack_half_2x16, GLSLstd450UnpackHalf2x16) BUILTIN_UNOPF(nir_op_pack_64_2x32, GLSLstd450PackDouble2x32) #undef BUILTIN_UNOP