mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 15:40:11 +01:00
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
2 changed files with 6 additions and 3 deletions
|
|
@ -114,7 +114,11 @@ static void scan_io_usage(struct si_shader_info *info, nir_intrinsic_instr *intr
|
||||||
unsigned loc = driver_location + i;
|
unsigned loc = driver_location + i;
|
||||||
|
|
||||||
info->input_semantic[loc] = semantic + i;
|
info->input_semantic[loc] = semantic + i;
|
||||||
info->input_interpolate[loc] = interp;
|
|
||||||
|
if (semantic == SYSTEM_VALUE_PRIMITIVE_ID)
|
||||||
|
info->input_interpolate[loc] = INTERP_MODE_FLAT;
|
||||||
|
else
|
||||||
|
info->input_interpolate[loc] = interp;
|
||||||
|
|
||||||
if (mask) {
|
if (mask) {
|
||||||
info->input_usage_mask[loc] |= mask;
|
info->input_usage_mask[loc] |= 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;
|
unsigned offset, ps_input_cntl = 0;
|
||||||
|
|
||||||
if (interpolate == INTERP_MODE_FLAT ||
|
if (interpolate == INTERP_MODE_FLAT ||
|
||||||
(interpolate == INTERP_MODE_COLOR && rs->flatshade) ||
|
(interpolate == INTERP_MODE_COLOR && rs->flatshade))
|
||||||
semantic == VARYING_SLOT_PRIMITIVE_ID)
|
|
||||||
ps_input_cntl |= S_028644_FLAT_SHADE(1);
|
ps_input_cntl |= S_028644_FLAT_SHADE(1);
|
||||||
|
|
||||||
if (semantic == VARYING_SLOT_PNTC ||
|
if (semantic == VARYING_SLOT_PNTC ||
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue