[Libclc-dev] [PATCH 2/4] spirv: remove step/smoothstep apis not defined for SPIR-V
Jan Vesely via Libclc-dev
libclc-dev at lists.llvm.org
Fri Oct 11 14:17:46 PDT 2019
On Fri, 2019-09-27 at 10:59 +1000, Dave Airlie via Libclc-dev wrote:
> ---
> 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
Is it illegal to call step/smoothstep when targetting SPIR-V? or do
the headers implement it as a macro?
either way it'd be preferable to follow the existing overload
mechanism rather than adding ifdefs across the sources (more in
reponse to the cmake changes).
Jan
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20191011/6552e0d3/attachment.sig>
More information about the Libclc-dev
mailing list