Mesa (master): vtn/opencl: native recip support

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


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Apr 29 18:30:08 2020 +0200

vtn/opencl: native recip 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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c
index dc5b5dd6a4a..2ea8f714774 100644
--- a/src/compiler/spirv/vtn_opencl.c
+++ b/src/compiler/spirv/vtn_opencl.c
@@ -89,6 +89,7 @@ nir_alu_op_for_opencl_opcode(struct vtn_builder *b,
    case OpenCLstd_Native_exp2: return nir_op_fexp2;
    case OpenCLstd_Native_log2: return nir_op_flog2;
    case OpenCLstd_Native_powr: return nir_op_fpow;
+   case OpenCLstd_Native_recip: return nir_op_frcp;
    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;
@@ -361,6 +362,7 @@ vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode,
    case OpenCLstd_Native_exp2:
    case OpenCLstd_Native_log2:
    case OpenCLstd_Native_powr:
+   case OpenCLstd_Native_recip:
    case OpenCLstd_Native_sin:
    case OpenCLstd_Fmod:
    case OpenCLstd_SMul_hi:



More information about the mesa-commit mailing list