microsoft/compiler: support nir_op_ffma

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
This commit is contained in:
Karol Herbst 2026-04-24 16:03:45 +02:00 committed by Marge Bot
parent 536ff644fa
commit 9bbb92a7cb

View file

@ -94,6 +94,7 @@ nir_options = {
.lower_fneg = true,
.lower_ffma16 = true,
.lower_ffma32 = true,
.float_mul_add64 = nir_float_muladd_support_has_ffma,
.lower_isign = true,
.lower_fsign = true,
.lower_iabs = true,
@ -180,8 +181,10 @@ dxil_get_nir_compiler_options(nir_shader_compiler_options *options,
options->lower_unpack_64_2x32_split = false;
options->lower_int64_options = ~0;
}
if (!(supported_float_sizes & 64))
if (!(supported_float_sizes & 64)) {
options->lower_doubles_options = ~0;
options->float_mul_add64 = 0;
}
if (shader_model_max >= SHADER_MODEL_6_4) {
options->has_sdot_4x8 = true;
options->has_udot_4x8 = true;
@ -2995,6 +2998,7 @@ emit_alu(struct ntd_context *ctx, nir_alu_instr *alu)
case nir_op_fsqrt: return emit_unary_intin(ctx, alu, DXIL_INTR_SQRT, src[0]);
case nir_op_fmax: return emit_binary_intin(ctx, alu, DXIL_INTR_FMAX, src[0], src[1]);
case nir_op_fmin: return emit_binary_intin(ctx, alu, DXIL_INTR_FMIN, src[0], src[1]);
case nir_op_ffma:
case nir_op_ffma_old:
if (alu->def.bit_size == 64)
ctx->mod.feats.dx11_1_double_extensions = 1;