From 31f678626f5895e8d13a73f1c2862fa922ba6c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Wed, 7 Dec 2022 16:11:41 +0100 Subject: [PATCH] r300: use nir lowering for ffloor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Negligible amount of instructions saved on RV530: total instructions in shared programs: 134970 -> 134963 (<.01%) instructions in affected programs: 2273 -> 2266 (-0.31%) helped: 9 HURT: 1 The one hurt shader is when we fail to recognize the x - ffract(x) pattern and skip the don't emit ftrunc optimization as implemented in the previous patch due to some non-trivial swizzles going on. Signed-off-by: Pavel Ondračka Reviewed-by: Emma Anholt Acked-by: Filip Gawin Part-of: --- src/gallium/drivers/r300/r300_screen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 55d47de2b6f..a34f4d0c302 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -498,6 +498,7 @@ static int r300_get_video_param(struct pipe_screen *screen, .lower_extract_word = true, \ .lower_fdiv = true, \ .lower_fdph = true, \ + .lower_ffloor = true, \ .lower_flrp32 = true, \ .lower_flrp64 = true, \ .lower_fmod = true, \