mesa/st: Add an assertion for finalize_nir versus PIPE_CAP_TEXCOORD.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12218>
This commit is contained in:
Emma Anholt 2021-08-31 16:31:26 -07:00 committed by Marge Bot
parent 9194ee90c8
commit 6dd87592a6

View file

@ -69,6 +69,9 @@ st_nir_fixup_varying_slots(struct st_context *st, nir_shader *shader,
if (st->needs_texcoord_semantic)
return;
/* This is called from finalize, but we don't want to do this adjustment twice. */
assert(!st->allow_st_finalize_nir_twice);
nir_foreach_variable_with_modes(var, shader, mode) {
if (var->data.location >= VARYING_SLOT_VAR0) {
var->data.location += 9;