From 0d92ec44e52cf29a4f5de44e4623eeff3036fcb9 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 17 Aug 2022 18:14:31 -0700 Subject: [PATCH] intel/brw: Don't emit Z coordinate interpolation if CPS isn't in use. Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_fs_visitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index d7735315870..1b5e7001029 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -352,7 +352,8 @@ fs_visitor::emit_interpolation_setup() abld = bld.annotate("compute pos.z"); fs_reg coarse_z; - if (wm_prog_data->uses_depth_w_coefficients) { + if (wm_prog_data->coarse_pixel_dispatch != BRW_NEVER && + wm_prog_data->uses_depth_w_coefficients) { /* In coarse pixel mode, the HW doesn't interpolate Z coordinate * properly. In the same way we have to add the coarse pixel size to * pixels locations, here we recompute the Z value with 2 coefficients