nir/lower_io: add nir_io_semantics::interp_explicit_strict

This preserves the misnamed "per_vertex" flag in lowered IO.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28312>
This commit is contained in:
Marek Olšák 2024-03-18 12:15:41 -04:00 committed by Marge Bot
parent f02678bb50
commit 2034cf87c5
2 changed files with 7 additions and 1 deletions

View file

@ -1950,7 +1950,8 @@ typedef struct nir_io_semantics {
unsigned no_varying : 1; /* whether this output isn't consumed by the next stage */
unsigned no_sysval_output : 1; /* whether this system value output has no
effect due to current pipeline states */
unsigned _pad : 2;
unsigned interp_explicit_strict : 1; /* preserve original vertex order */
unsigned _pad : 1;
} nir_io_semantics;
/* Transform feedback info for 2 outputs. nir_intrinsic_store_output contains

View file

@ -340,6 +340,11 @@ emit_load(struct lower_io_state *state,
var->data.precision == GLSL_PRECISION_MEDIUM ||
var->data.precision == GLSL_PRECISION_LOW;
semantics.high_dvec2 = high_dvec2;
/* "per_vertex" is misnamed. It means "explicit interpolation with
* the original vertex order", which is a stricter version of
* INTERP_MODE_EXPLICIT.
*/
semantics.interp_explicit_strict = var->data.per_vertex;
nir_intrinsic_set_io_semantics(load, semantics);
}