[Mesa-dev] [PATCH 4/6] nir: use util/convert.h

Rob Clark robdclark at gmail.com
Sat Oct 10 11:47:45 PDT 2015


From: Rob Clark <robclark at freedesktop.org>

Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
 src/glsl/nir/nir_constant_expressions.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/glsl/nir/nir_constant_expressions.py b/src/glsl/nir/nir_constant_expressions.py
index 8fd9b10..ba28c0e 100644
--- a/src/glsl/nir/nir_constant_expressions.py
+++ b/src/glsl/nir/nir_constant_expressions.py
@@ -28,6 +28,7 @@ template = """\
 
 #include <math.h>
 #include "main/core.h"
+#include "util/convert.h"
 #include "util/rounding.h" /* for _mesa_roundeven */
 #include "nir_constant_expressions.h"
 
@@ -199,7 +200,7 @@ unpack_unorm_1x16(uint16_t u)
 static uint16_t
 pack_half_1x16(float x)
 {
-   return _mesa_float_to_half(x);
+   return float_to_half(x);
 }
 
 /**
@@ -208,7 +209,7 @@ pack_half_1x16(float x)
 static float
 unpack_half_1x16(uint16_t u)
 {
-   return _mesa_half_to_float(u);
+   return half_to_float(u);
 }
 
 /* Some typed vector structures to make things like src0.y work */
-- 
2.4.3



More information about the mesa-dev mailing list