From: Erico Nunes Date: Tue, 16 Apr 2019 21:21:24 +0000 (+0200) Subject: lima/ppir: support ppir_op_ceil X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56230f042831785c085c07ed1b5fa0f0b27848bc;p=mesa.git lima/ppir: support ppir_op_ceil Add a few missing ppir_op_ceil enum handling entries to implement nir_op_fceil in lima ppir. Signed-off-by: Erico Nunes Reviewed-by: Vasily Khoruzhick Reviewed-by: Qiang Yu --- diff --git a/src/gallium/drivers/lima/ir/pp/codegen.c b/src/gallium/drivers/lima/ir/pp/codegen.c index 1cce28595e6..23d9a7aa41b 100644 --- a/src/gallium/drivers/lima/ir/pp/codegen.c +++ b/src/gallium/drivers/lima/ir/pp/codegen.c @@ -300,6 +300,9 @@ static void ppir_codegen_encode_vec_add(ppir_node *node, void *code) case ppir_op_floor: f->op = ppir_codegen_vec4_acc_op_floor; break; + case ppir_op_ceil: + f->op = ppir_codegen_vec4_acc_op_ceil; + break; case ppir_op_fract: f->op = ppir_codegen_vec4_acc_op_fract; break; @@ -373,6 +376,9 @@ static void ppir_codegen_encode_scl_add(ppir_node *node, void *code) case ppir_op_floor: f->op = ppir_codegen_float_acc_op_floor; break; + case ppir_op_ceil: + f->op = ppir_codegen_float_acc_op_ceil; + break; case ppir_op_fract: f->op = ppir_codegen_float_acc_op_fract; break; diff --git a/src/gallium/drivers/lima/ir/pp/nir.c b/src/gallium/drivers/lima/ir/pp/nir.c index 669c632b96a..a962a2b776f 100644 --- a/src/gallium/drivers/lima/ir/pp/nir.c +++ b/src/gallium/drivers/lima/ir/pp/nir.c @@ -134,6 +134,7 @@ static int nir_to_ppir_opcodes[nir_num_opcodes] = { [nir_op_fmin] = ppir_op_min, [nir_op_frcp] = ppir_op_rcp, [nir_op_ffloor] = ppir_op_floor, + [nir_op_fceil] = ppir_op_ceil, [nir_op_ffract] = ppir_op_fract, [nir_op_fand] = ppir_op_and, [nir_op_for] = ppir_op_or, diff --git a/src/gallium/drivers/lima/ir/pp/node.c b/src/gallium/drivers/lima/ir/pp/node.c index 9c871abb4c9..0f4cacb33a1 100644 --- a/src/gallium/drivers/lima/ir/pp/node.c +++ b/src/gallium/drivers/lima/ir/pp/node.c @@ -131,6 +131,13 @@ const ppir_op_info ppir_op_infos[] = { PPIR_INSTR_SLOT_END }, }, + [ppir_op_ceil] = { + .name = "ceil", + .slots = (int []) { + PPIR_INSTR_SLOT_ALU_SCL_ADD, PPIR_INSTR_SLOT_ALU_VEC_ADD, + PPIR_INSTR_SLOT_END + }, + }, [ppir_op_fract] = { .name = "fract", .slots = (int []) {