mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
intel/brw: Skip per-primitive inputs when computing flat input mask
The per-primitive have their own separate section in the FS thread payload, and are not considered when setting the mask in 3STATE_SBE's ConstantInterpolationEnable. This is also consistent with what is done for brw_interp_reg(). Fixes - dEQP-VK.mesh_shader.ext.misc.clip_geom_provoking_last - dEQP-VK.mesh_shader.ext.misc.clip_geom_and_task_shader_provoking_last Backport-to: 24.2 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11844 Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31417>
This commit is contained in:
parent
cc66268817
commit
93c3780bc1
1 changed files with 3 additions and 1 deletions
|
|
@ -1014,6 +1014,8 @@ brw_compute_flat_inputs(struct brw_wm_prog_data *prog_data,
|
|||
{
|
||||
prog_data->flat_inputs = 0;
|
||||
|
||||
const unsigned per_vertex_start = prog_data->num_per_primitive_inputs;
|
||||
|
||||
nir_foreach_shader_in_variable(var, shader) {
|
||||
/* flat shading */
|
||||
if (var->data.interpolation != INTERP_MODE_FLAT)
|
||||
|
|
@ -1024,7 +1026,7 @@ brw_compute_flat_inputs(struct brw_wm_prog_data *prog_data,
|
|||
|
||||
unsigned slots = glsl_count_attribute_slots(var->type, false);
|
||||
for (unsigned s = 0; s < slots; s++) {
|
||||
int input_index = prog_data->urb_setup[var->data.location + s];
|
||||
int input_index = prog_data->urb_setup[var->data.location + s] - per_vertex_start;
|
||||
|
||||
if (input_index >= 0)
|
||||
prog_data->flat_inputs |= 1 << input_index;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue