From 7db8d307bcb7cad8e4cb27a4d73212e73d895a3a Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 7 Apr 2021 19:58:19 +0100 Subject: [PATCH] radv: remove second nir_lower_idiv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nir_lower_idiv now lowers 8/16-bit divisions. Signed-off-by: Rhys Perry Reviewed-by: Timur Kristóf Part-of: --- src/amd/vulkan/radv_pipeline.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 71b2aaca605..168ee087579 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3072,14 +3072,9 @@ lower_bit_size_callback(const nir_instr *instr, void *_) switch (alu->op) { case nir_op_iabs: case nir_op_bitfield_select: - case nir_op_udiv: - case nir_op_idiv: - case nir_op_umod: - case nir_op_imod: case nir_op_imul_high: case nir_op_umul_high: case nir_op_ineg: - case nir_op_irem: case nir_op_isign: return 32; case nir_op_imax: @@ -3369,9 +3364,6 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_device *device, } if (nir_lower_bit_size(nir[i], lower_bit_size_callback, device)) { - // TODO: lower idiv beforehand - if (nir_lower_idiv(nir[i], nir_lower_idiv_precise)) - NIR_PASS_V(nir[i], nir_opt_algebraic_late); /* needed for removing ineg again */ NIR_PASS_V(nir[i], nir_opt_constant_folding); NIR_PASS_V(nir[i], nir_opt_dce); }