intel/fs: handle interpolation modes for at_sample and at_offset too
Fixes dEQP-VK.draw.*.linear_interpolation.* Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19647>
This commit is contained in:
@@ -7159,6 +7159,8 @@ brw_compute_barycentric_interp_modes(const struct intel_device_info *devinfo,
|
||||
case nir_intrinsic_load_barycentric_pixel:
|
||||
case nir_intrinsic_load_barycentric_centroid:
|
||||
case nir_intrinsic_load_barycentric_sample:
|
||||
case nir_intrinsic_load_barycentric_at_sample:
|
||||
case nir_intrinsic_load_barycentric_at_offset:
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
@@ -7375,6 +7377,20 @@ brw_nir_populate_wm_prog_data(const nir_shader *shader,
|
||||
|
||||
prog_data->barycentric_interp_modes =
|
||||
brw_compute_barycentric_interp_modes(devinfo, shader);
|
||||
|
||||
/* From the BDW PRM documentation for 3DSTATE_WM:
|
||||
*
|
||||
* "MSDISPMODE_PERSAMPLE is required in order to select Perspective
|
||||
* Sample or Non- perspective Sample barycentric coordinates."
|
||||
*
|
||||
* So cleanup any potentially set sample barycentric mode when not in per
|
||||
* sample dispatch.
|
||||
*/
|
||||
if (prog_data->persample_dispatch == BRW_NEVER) {
|
||||
prog_data->barycentric_interp_modes &=
|
||||
~BITFIELD_BIT(BRW_BARYCENTRIC_PERSPECTIVE_SAMPLE);
|
||||
}
|
||||
|
||||
prog_data->uses_nonperspective_interp_modes |=
|
||||
(prog_data->barycentric_interp_modes &
|
||||
BRW_BARYCENTRIC_NONPERSPECTIVE_BITS) != 0;
|
||||
|
||||
Reference in New Issue
Block a user