vtn/opencl: add native_tan-support
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-By: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
This commit is contained in:

committed by
Marge Bot

parent
aab1361d59
commit
f76b379a9a
@@ -204,6 +204,8 @@ handle_special(struct vtn_builder *b, enum OpenCLstd_Entrypoints opcode,
|
|||||||
return nir_flog(nb, srcs[0]);
|
return nir_flog(nb, srcs[0]);
|
||||||
case OpenCLstd_Native_log10:
|
case OpenCLstd_Native_log10:
|
||||||
return nir_fmul_imm(nb, nir_flog2(nb, srcs[0]), log(2) / log(10));
|
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:
|
default:
|
||||||
vtn_fail("No NIR equivalent");
|
vtn_fail("No NIR equivalent");
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -409,6 +411,7 @@ vtn_handle_opencl_instruction(struct vtn_builder *b, SpvOp ext_opcode,
|
|||||||
case OpenCLstd_Native_exp10:
|
case OpenCLstd_Native_exp10:
|
||||||
case OpenCLstd_Native_log:
|
case OpenCLstd_Native_log:
|
||||||
case OpenCLstd_Native_log10:
|
case OpenCLstd_Native_log10:
|
||||||
|
case OpenCLstd_Native_tan:
|
||||||
handle_instr(b, cl_opcode, w, count, handle_special);
|
handle_instr(b, cl_opcode, w, count, handle_special);
|
||||||
return true;
|
return true;
|
||||||
case OpenCLstd_Vloadn:
|
case OpenCLstd_Vloadn:
|
||||||
|
Reference in New Issue
Block a user