[Libclc-dev] [PATCH 2/4] spirv: remove step/smoothstep apis not defined for SPIR-V
Dave Airlie via Libclc-dev
libclc-dev at lists.llvm.org
Thu Sep 26 17:59:17 PDT 2019
---
libclc/generic/lib/common/smoothstep.cl | 3 ++-
libclc/generic/lib/common/step.cl | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libclc/generic/lib/common/smoothstep.cl b/libclc/generic/lib/common/smoothstep.cl
index 68d1a13ab39..9ff41e13291 100644
--- a/libclc/generic/lib/common/smoothstep.cl
+++ b/libclc/generic/lib/common/smoothstep.cl
@@ -46,10 +46,11 @@ SMOOTH_STEP_DEF(double, double, SMOOTH_STEP_IMPL_D);
_CLC_TERNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, smoothstep, double, double, double);
+#ifndef CLC_SPIRV // SPIRV doesn't define these
SMOOTH_STEP_DEF(float, double, SMOOTH_STEP_IMPL_D);
SMOOTH_STEP_DEF(double, float, SMOOTH_STEP_IMPL_D);
_CLC_V_S_S_V_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, smoothstep, float, float, double);
_CLC_V_S_S_V_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, smoothstep, double, double, float);
-
+#endif
#endif
diff --git a/libclc/generic/lib/common/step.cl b/libclc/generic/lib/common/step.cl
index 4b022f1316c..3ceec7b8be3 100644
--- a/libclc/generic/lib/common/step.cl
+++ b/libclc/generic/lib/common/step.cl
@@ -45,10 +45,11 @@ STEP_DEF(double, double);
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, step, double, double);
_CLC_V_S_V_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, step, double, double);
+#ifndef CLC_SPIRV
STEP_DEF(float, double);
STEP_DEF(double, float);
_CLC_V_S_V_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, double, step, float, double);
_CLC_V_S_V_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, float, step, double, float);
-
+#endif
#endif
--
2.21.0
More information about the Libclc-dev
mailing list