radeonsi: force flat for PrimID early in si_nir_scan_shader
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12343>
This commit is contained in:
parent
5cdbbcc2ab
commit
b59bb9c07a
|
@ -114,6 +114,10 @@ static void scan_io_usage(struct si_shader_info *info, nir_intrinsic_instr *intr
|
|||
unsigned loc = driver_location + i;
|
||||
|
||||
info->input_semantic[loc] = semantic + i;
|
||||
|
||||
if (semantic == SYSTEM_VALUE_PRIMITIVE_ID)
|
||||
info->input_interpolate[loc] = INTERP_MODE_FLAT;
|
||||
else
|
||||
info->input_interpolate[loc] = interp;
|
||||
|
||||
if (mask) {
|
||||
|
|
|
@ -3531,8 +3531,7 @@ static unsigned si_get_ps_input_cntl(struct si_context *sctx, struct si_shader *
|
|||
unsigned offset, ps_input_cntl = 0;
|
||||
|
||||
if (interpolate == INTERP_MODE_FLAT ||
|
||||
(interpolate == INTERP_MODE_COLOR && rs->flatshade) ||
|
||||
semantic == VARYING_SLOT_PRIMITIVE_ID)
|
||||
(interpolate == INTERP_MODE_COLOR && rs->flatshade))
|
||||
ps_input_cntl |= S_028644_FLAT_SHADE(1);
|
||||
|
||||
if (semantic == VARYING_SLOT_PNTC ||
|
||||
|
|
Loading…
Reference in New Issue