Mesa (master): vtn/opencl: add native_tan-support

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 4 11:53:42 UTC 2020


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Mon Mar 16 13:00:27 2020 +0100

vtn/opencl: add native_tan-support

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-By: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>

---

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

diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c
index eb8aaac7d1c..89fad0bad79 100644
--- a/src/compiler/spirv/vtn_opencl.c
+++ b/src/compiler/spirv/vtn_opencl.c
@@ -204,6 +204,8 @@ handle_special(struct vtn_builder *b, enum OpenCLstd_Entrypoints opcode,
       return nir_flog(nb, srcs[0]);
    case OpenCLstd_Native_log10:
       return nir_fmul_imm(nb, nir_flog2(nb, srcs[0]), log(2) / log(10));
+   case OpenCLstd_Native_tan:
+      return nir_ftan(nb, srcs[0]);
    default:
       vtn_fail("No NIR equivalent");
       return NULL;
@@ -409,6 +411,7 @@ vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode,
    case OpenCLstd_Native_exp10:
    case OpenCLstd_Native_log:
    case OpenCLstd_Native_log10:
+   case OpenCLstd_Native_tan:
       handle_instr(b, cl_opcode, w, count, handle_special);
       return true;
    case OpenCLstd_Vloadn:



More information about the mesa-commit mailing list