diff options
author | Boris Brezillon <[email protected]> | 2020-03-17 13:38:44 +0000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-26 10:14:22 +0000 |
commit | efdce97e4bb0a4b2e5d81d2f9276f3eedd9561b6 (patch) | |
tree | f7f525d584e22d56dba7f8057abf52f264869100 /src/compiler | |
parent | 6d69ed88f875b1ed0cc0def96067fc2a92f4d0ed (diff) |
vtn/opencl: add rint-support
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/spirv/vtn_opencl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c index 0dc95a19f6b..da191f2b80a 100644 --- a/src/compiler/spirv/vtn_opencl.c +++ b/src/compiler/spirv/vtn_opencl.c @@ -100,6 +100,7 @@ nir_alu_op_for_opencl_opcode(struct vtn_builder *b, case OpenCLstd_SSub_sat: return nir_op_isub_sat; case OpenCLstd_USub_sat: return nir_op_usub_sat; case OpenCLstd_Trunc: return nir_op_ftrunc; + case OpenCLstd_Rint: return nir_op_fround_even; /* uhm... */ case OpenCLstd_UAbs: return nir_op_mov; default: @@ -366,6 +367,7 @@ vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode, case OpenCLstd_SSub_sat: case OpenCLstd_USub_sat: case OpenCLstd_Trunc: + case OpenCLstd_Rint: handle_instr(b, cl_opcode, w, count, handle_alu); return true; case OpenCLstd_SAbs_diff: |