Module: Mesa
Branch: master
Commit: 25cb87bcdd558747f3dd06be033c2a93ab634d53
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=25cb87bcdd558747f3dd06be033c2a93ab634d53

Author: Erik Faye-Lund <[email protected]>
Date:   Fri Mar 13 11:57:52 2020 +0100

vtn/opencl: add native exp/log-support

Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>

---

 src/compiler/spirv/vtn_opencl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c
index 003a9914110..5eeaed4c3b4 100644
--- a/src/compiler/spirv/vtn_opencl.c
+++ b/src/compiler/spirv/vtn_opencl.c
@@ -193,6 +193,10 @@ handle_special(struct vtn_builder *b, enum 
OpenCLstd_Entrypoints opcode,
    case OpenCLstd_S_Upsample:
    case OpenCLstd_U_Upsample:
       return nir_upsample(nb, srcs[0], srcs[1]);
+   case OpenCLstd_Native_exp:
+      return nir_fexp(nb, srcs[0]);
+   case OpenCLstd_Native_log:
+      return nir_flog(nb, srcs[0]);
    default:
       vtn_fail("No NIR equivalent");
       return NULL;
@@ -391,6 +395,8 @@ vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp 
ext_opcode,
    case OpenCLstd_S_Upsample:
    case OpenCLstd_U_Upsample:
    case OpenCLstd_Clz:
+   case OpenCLstd_Native_exp:
+   case OpenCLstd_Native_log:
       handle_instr(b, cl_opcode, w, count, handle_special);
       return true;
    case OpenCLstd_Vloadn:

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to