summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2020-03-25 21:19:01 +0100
committerMarge Bot <[email protected]>2020-03-26 10:14:22 +0000
commit6d69ed88f875b1ed0cc0def96067fc2a92f4d0ed (patch)
tree570b6c7ada9502be5f18429bf6d70e28e34de86b /src/compiler
parent7b2bfb6bc4e354cfaf3f9f2774906c54c03cff0e (diff)
vtn/opencl: add native exp2/log2-support
Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/spirv/vtn_opencl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c
index b696241209d..0dc95a19f6b 100644
--- a/src/compiler/spirv/vtn_opencl.c
+++ b/src/compiler/spirv/vtn_opencl.c
@@ -84,6 +84,8 @@ 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_exp2: return nir_op_fexp2;
+ case OpenCLstd_Native_log2: return nir_op_flog2;
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;
@@ -347,6 +349,8 @@ vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode,
case OpenCLstd_SMin:
case OpenCLstd_UMin:
case OpenCLstd_Mix:
+ case OpenCLstd_Native_exp2:
+ case OpenCLstd_Native_log2:
case OpenCLstd_Fmod:
case OpenCLstd_SMul_hi:
case OpenCLstd_UMul_hi: