mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 11:10:34 +01:00
agx: use util_is_probably_float
To demonstrate that this helper is legitimately useful cross-tree and should be made common code :-) Sample AGX IR with this patch: 10 = mov_imm #0x3f5680f1 /* 0.837905 */ Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Reviewed-by: Mary Guillemard <mary@mary.zone> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40021>
This commit is contained in:
parent
da4296c27c
commit
bac43d28a9
1 changed files with 5 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "util/lut.h"
|
||||
#include "util/u_math.h"
|
||||
#include "agx_builder.h"
|
||||
#include "agx_compiler.h"
|
||||
|
||||
|
|
@ -191,7 +192,10 @@ agx_print_instr(const agx_instr *I, FILE *fp)
|
|||
else
|
||||
print_comma = true;
|
||||
|
||||
fprintf(fp, "#%" PRIx64, I->imm);
|
||||
fprintf(fp, "#0x%" PRIx64, I->imm);
|
||||
if (I->imm && util_is_probably_float(I->imm)) {
|
||||
fprintf(fp, " /* %f */", uif(I->imm));
|
||||
}
|
||||
}
|
||||
|
||||
if (info.immediates & AGX_IMMEDIATE_DIM) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue