brw: fix coarse_z computation on Xe2+

The payload format changed and we forgot to update this path.

Putting a Fixes: commit that is kind of related but probably not the
source of the issue.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12031
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11871
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12042
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12339
Fixes: 4672fcbc76 ("intel/fs: Fix PS thread payload setup for depth_w_coef_reg.")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
(cherry picked from commit 2774fb32e6)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:
Lionel Landwerlin
2025-01-15 12:26:45 +02:00
committed by Dylan Baker
parent be4ab526b2
commit acc1e9efab
2 changed files with 16 additions and 6 deletions

View File

@@ -124,7 +124,7 @@
"description": "brw: fix coarse_z computation on Xe2+",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "4672fcbc76b1e2d02810cd95584fcfa72f774b47",
"notes": null

View File

@@ -426,11 +426,21 @@ brw_emit_interpolation_setup(fs_visitor &s)
* in X & Y axis.
*/
brw_reg coef_payload = brw_vec8_grf(payload.depth_w_coef_reg, 0);
const brw_reg x_start = brw_vec1_grf(coef_payload.nr, 2);
const brw_reg y_start = brw_vec1_grf(coef_payload.nr, 6);
const brw_reg z_cx = brw_vec1_grf(coef_payload.nr, 1);
const brw_reg z_cy = brw_vec1_grf(coef_payload.nr, 0);
const brw_reg z_c0 = brw_vec1_grf(coef_payload.nr, 3);
const brw_reg x_start = devinfo->ver >= 20 ?
brw_vec1_grf(coef_payload.nr, 6) :
brw_vec1_grf(coef_payload.nr, 2);
const brw_reg y_start = devinfo->ver >= 20 ?
brw_vec1_grf(coef_payload.nr, 7) :
brw_vec1_grf(coef_payload.nr, 6);
const brw_reg z_cx = devinfo->ver >= 20 ?
brw_vec1_grf(coef_payload.nr + 1, 1) :
brw_vec1_grf(coef_payload.nr, 1);
const brw_reg z_cy = devinfo->ver >= 20 ?
brw_vec1_grf(coef_payload.nr + 1, 0) :
brw_vec1_grf(coef_payload.nr, 0);
const brw_reg z_c0 = devinfo->ver >= 20 ?
brw_vec1_grf(coef_payload.nr + 1, 2) :
brw_vec1_grf(coef_payload.nr, 3);
const brw_reg float_pixel_x = abld.vgrf(BRW_TYPE_F);
const brw_reg float_pixel_y = abld.vgrf(BRW_TYPE_F);