zink: clamp subgroup op return types to required int/uint types

required by spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37239>
This commit is contained in:
Mike Blumenkrantz 2025-09-08 11:06:15 -04:00
parent fe82d156bf
commit a11a02d6f6

View file

@ -3329,6 +3329,16 @@ emit_subgroup(struct ntv_context *ctx, nir_intrinsic_instr *intr)
atype = nir_type_float;
src0 = emit_bitcast(ctx, get_def_type(ctx, intr->src[0].ssa, atype), src0);
break;
case SpvOpGroupNonUniformUMin:
case SpvOpGroupNonUniformUMax:
atype = nir_type_uint;
src0 = emit_bitcast(ctx, get_def_type(ctx, intr->src[0].ssa, atype), src0);
break;
case SpvOpGroupNonUniformSMin:
case SpvOpGroupNonUniformSMax:
atype = nir_type_int;
src0 = emit_bitcast(ctx, get_def_type(ctx, intr->src[0].ssa, atype), src0);
break;
default: break;
}
SpvId type = get_def_type(ctx, intr->src[0].ssa, atype);