From e3e58d6f48499d56fbdb74fd22ca94db21364455 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 18 Nov 2024 14:13:02 -0800 Subject: [PATCH] brw: Emit immediate value for MAD in canonical position No shader-db changes on any Intel platform. fossil-db: Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results. (Meteor Lake shown) Totals: Cycle count: 25096109024 -> 25096108722 (-0.00%); split: -0.00%, +0.00% Totals from 4106 (0.51% of 797610) affected shaders: Cycle count: 63266176 -> 63265874 (-0.00%); split: -0.01%, +0.01% Reviewed-by: Caio Oliveira Reviewed-by: Matt Turner Part-of: --- src/intel/compiler/brw_compile_fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_compile_fs.cpp b/src/intel/compiler/brw_compile_fs.cpp index 3514d608d92..18985365198 100644 --- a/src/intel/compiler/brw_compile_fs.cpp +++ b/src/intel/compiler/brw_compile_fs.cpp @@ -453,8 +453,8 @@ brw_emit_interpolation_setup(fs_visitor &s) abld.MOV(f_cps_height, u32_cps_height); /* Center in the middle of the coarse pixel. */ - abld.MAD(float_pixel_x, float_pixel_x, brw_imm_f(0.5f), f_cps_width); - abld.MAD(float_pixel_y, float_pixel_y, brw_imm_f(0.5f), f_cps_height); + abld.MAD(float_pixel_x, float_pixel_x, f_cps_width, brw_imm_f(0.5f)); + abld.MAD(float_pixel_y, float_pixel_y, f_cps_height, brw_imm_f(0.5f)); coarse_z = abld.vgrf(BRW_TYPE_F); abld.MAD(coarse_z, z_c0, z_cx, float_pixel_x);