From 8fb25c48a4070d3ffcfcfaa80440f5563058c0ba Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Tue, 18 Aug 2020 07:59:56 -0700 Subject: [PATCH] vtn/opencl: Only use libclc ldexp when lower_ldexp is set Reviewed-by: Dave Airlie Part-of: --- src/compiler/spirv/vtn_opencl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/spirv/vtn_opencl.c b/src/compiler/spirv/vtn_opencl.c index f76238ee526..c35f05a1a30 100644 --- a/src/compiler/spirv/vtn_opencl.c +++ b/src/compiler/spirv/vtn_opencl.c @@ -550,6 +550,10 @@ handle_special(struct vtn_builder *b, uint32_t opcode, return nir_fmul_imm(nb, nir_flog2(nb, srcs[0]), log(2) / log(10)); case OpenCLstd_Native_tan: return nir_ftan(nb, srcs[0]); + case OpenCLstd_Ldexp: + if (nb->shader->options->lower_ldexp) + break; + return nir_ldexp(nb, srcs[0], srcs[1]); default: break; }