diff options
author | Erico Nunes <[email protected]> | 2019-04-16 23:21:24 +0200 |
---|---|---|
committer | Qiang Yu <[email protected]> | 2019-04-19 10:22:03 +0000 |
commit | 56230f042831785c085c07ed1b5fa0f0b27848bc (patch) | |
tree | f56ee8c956be7fae5d3339cd263ebab02883e8a6 /src/gallium/drivers | |
parent | 8d2654a4197bbf45cbe9f72e82f025d04cda7bc2 (diff) |
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 <[email protected]>
Reviewed-by: Vasily Khoruzhick <[email protected]>
Reviewed-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/lima/ir/pp/codegen.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/lima/ir/pp/nir.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/lima/ir/pp/node.c | 7 |
3 files changed, 14 insertions, 0 deletions
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 []) { |