intel/fs: Add support for printing half-float immediate values

v2: Remove offensive, extraneous 0 in hex constant.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7650>
This commit is contained in:
Ian Romanick 2020-07-29 16:38:40 -07:00 committed by Marge Bot
parent 91f7e262e1
commit 50fef61fa5
1 changed files with 3 additions and 0 deletions

View File

@ -7328,6 +7328,9 @@ fs_visitor::dump_instruction(const backend_instruction *be_inst, FILE *file) con
break;
case IMM:
switch (inst->src[i].type) {
case BRW_REGISTER_TYPE_HF:
fprintf(file, "%-ghf", _mesa_half_to_float(inst->src[i].ud & 0xffff));
break;
case BRW_REGISTER_TYPE_F:
fprintf(file, "%-gf", inst->src[i].f);
break;