ac: add per output is_16bit flag to ac_shader_abi

Outputs are always f32 except for FS that may use unpacked f16.
Store this information here to make it available to later processing.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17361>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2022-07-05 12:26:00 +02:00
committed by Marge Bot
parent c275e69cee
commit 196c4ebe1a
3 changed files with 8 additions and 3 deletions
@@ -1062,8 +1062,10 @@ bool si_llvm_translate_nir(struct si_shader_context *ctx, struct si_shader *shad
nir_alu_type_get_type_size(ctx->shader->selector->info.output_type[i]) == 16)
type = ctx->ac.f16;
for (unsigned j = 0; j < 4; j++)
for (unsigned j = 0; j < 4; j++) {
ctx->abi.outputs[i * 4 + j] = ac_build_alloca_undef(&ctx->ac, type, "");
ctx->abi.is_16bit[i * 4 + j] = type == ctx->ac.f16;
}
}
ac_nir_translate(&ctx->ac, &ctx->abi, &ctx->args, nir);