mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 13:40:16 +01:00
brw/nir: Fix source handling of nir_intrinsic_load_barycentric_at_offset
The source of nir_intrinsic_load_barycentric_at_offset is a vector, so
-1 should be passed to get_nir_src. This is also done for texture
sampling intrinsics.
I skimmed the other user of get_nir_src, and I believe they are
correct. This one was just missed as LNL support landed an many, many
rebases of the original MR occurred.
v2: Fix another get_nir_src call. Suggested by Lionel.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: d5d7ae22ae ("brw/nir: Fix up handling of sources that might be convergent vectors")
Closes: #12464
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33007>
This commit is contained in:
parent
739da17f6e
commit
38b58e286f
1 changed files with 2 additions and 2 deletions
|
|
@ -4493,7 +4493,7 @@ brw_from_nir_emit_fs_intrinsic(nir_to_brw_state &ntb,
|
|||
if (devinfo->ver >= 20) {
|
||||
emit_pixel_interpolater_alu_at_offset(
|
||||
bld, dest,
|
||||
retype(get_nir_src(ntb, instr->src[0]), BRW_TYPE_F),
|
||||
retype(get_nir_src(ntb, instr->src[0], -1), BRW_TYPE_F),
|
||||
interpolation);
|
||||
|
||||
} else if (nir_const_value *const_offset = nir_src_as_const_value(instr->src[0])) {
|
||||
|
|
@ -4539,7 +4539,7 @@ brw_from_nir_emit_fs_intrinsic(nir_to_brw_state &ntb,
|
|||
if (bary_intrin == nir_intrinsic_load_barycentric_at_offset ||
|
||||
bary_intrin == nir_intrinsic_load_barycentric_at_sample) {
|
||||
/* Use the result of the PI message. */
|
||||
dst_xy = retype(get_nir_src(ntb, instr->src[0]), BRW_TYPE_F);
|
||||
dst_xy = retype(get_nir_src(ntb, instr->src[0], -1), BRW_TYPE_F);
|
||||
} else {
|
||||
/* Use the delta_xy values computed from the payload */
|
||||
enum intel_barycentric_mode bary = brw_barycentric_mode(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue