From: Erik Faye-Lund Date: Wed, 29 Apr 2020 16:23:11 +0000 (+0200) Subject: vtn/opencl: native variants of sin/cos X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bce8a86b652981db3684da943c6cbb3fd7d7f1ae;p=mesa.git vtn/opencl: native variants of sin/cos These obviously map directly to nir opcodes. Reviewed-by: Alyssa Rosenzweig Reviewed-By: Karol Herbst Part-of: --- diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c index 89fad0bad79..a048f3de619 100644 --- a/src/compiler/spirv/vtn_opencl.c +++ b/src/compiler/spirv/vtn_opencl.c @@ -84,8 +84,10 @@ nir_alu_op_for_opencl_opcode(struct vtn_builder *b, case OpenCLstd_UMin: return nir_op_umin; case OpenCLstd_Fmod: return nir_op_fmod; case OpenCLstd_Mix: return nir_op_flrp; + case OpenCLstd_Native_cos: return nir_op_fcos; case OpenCLstd_Native_exp2: return nir_op_fexp2; case OpenCLstd_Native_log2: return nir_op_flog2; + case OpenCLstd_Native_sin: return nir_op_fsin; case OpenCLstd_SMul_hi: return nir_op_imul_high; case OpenCLstd_UMul_hi: return nir_op_umul_high; case OpenCLstd_Popcount: return nir_op_bit_count; @@ -352,8 +354,10 @@ vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode, case OpenCLstd_SMin: case OpenCLstd_UMin: case OpenCLstd_Mix: + case OpenCLstd_Native_cos: case OpenCLstd_Native_exp2: case OpenCLstd_Native_log2: + case OpenCLstd_Native_sin: case OpenCLstd_Fmod: case OpenCLstd_SMul_hi: case OpenCLstd_UMul_hi: