[Mesa-dev] [PATCH 14/51] intel/compiler/fs: Support for dumping 16-bit IMM values

Topi Pohjolainen topi.pohjolainen at gmail.com
Fri Nov 24 12:26:41 UTC 2017


Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
 src/intel/compiler/brw_fs.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 694fcc1919..1b972972c1 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -39,6 +39,7 @@
 #include "compiler/glsl_types.h"
 #include "compiler/nir/nir_builder.h"
 #include "program/prog_parameter.h"
+#include "util/half_float.h"
 
 using namespace brw;
 
@@ -5532,6 +5533,10 @@ fs_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
          break;
       case IMM:
          switch (inst->src[i].type) {
+         case BRW_REGISTER_TYPE_HF:
+            fprintf(file, "%-gHF",
+                    _mesa_half_to_float((uint16_t)inst->src[i].ud));
+            break;
          case BRW_REGISTER_TYPE_F:
             fprintf(file, "%-gf", inst->src[i].f);
             break;
-- 
2.11.0



More information about the mesa-dev mailing list