From f76b379a9a68dd71e39a6ca270107384a64f67cd Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 16 Mar 2020 13:00:27 +0100 Subject: [PATCH] vtn/opencl: add native_tan-support Reviewed-by: Alyssa Rosenzweig Reviewed-By: Karol Herbst Part-of: --- 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: -- 2.30.2