mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 02:40:11 +01:00
brw/nir: Use offset() for all uses of offs in emit_pixel_interpolater_alu_at_offset
This is necessary to appropriately uniformize the first component
access of a convergent vector. Without this, this is produced:
load_payload(16) %18:D, 0d, 0d NoMask group0
add(32) %21:F, %18+0.0:F, 0.5f
add(32) %22:F, %18+2.0<0>:F, 0.5f
This is the correct code:
load_payload(16) %18:D, 0d, 0d NoMask group0
add(32) %21:F, %18+0.0<0>:F, 0.5f
add(32) %22:F, %18+2.0<0>:F, 0.5f
Without 38b58e286f, the code generated was more incorrect, but happened
to work for this test case:
load_payload(16) %18:D, 0d, 0d NoMask group0
add(32) %21:F, %18+0.0<0>:F, 0.5f
add(32) %22:F, %18+0.4<0>:F, 0.5f
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 38b58e286f ("brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset")
Closes: #12969
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34427>
This commit is contained in:
parent
b5d1b0d7e3
commit
cb69d019cf
1 changed files with 1 additions and 1 deletions
|
|
@ -2159,7 +2159,7 @@ emit_pixel_interpolater_alu_at_offset(const brw_builder &bld,
|
||||||
|
|
||||||
/* Account for half-pixel X/Y coordinate offset. */
|
/* Account for half-pixel X/Y coordinate offset. */
|
||||||
const brw_reg off_x = bld.vgrf(BRW_TYPE_F);
|
const brw_reg off_x = bld.vgrf(BRW_TYPE_F);
|
||||||
bld.ADD(off_x, offs, brw_imm_f(0.5));
|
bld.ADD(off_x, offset(offs, bld, 0), brw_imm_f(0.5));
|
||||||
|
|
||||||
const brw_reg off_y = bld.vgrf(BRW_TYPE_F);
|
const brw_reg off_y = bld.vgrf(BRW_TYPE_F);
|
||||||
bld.ADD(off_y, offset(offs, bld, 1), brw_imm_f(0.5));
|
bld.ADD(off_y, offset(offs, bld, 1), brw_imm_f(0.5));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue