From e518c92d26e5aab7d1308323cad87451fda269b3 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 28 Aug 2023 08:46:06 -0400 Subject: [PATCH] asahi: Assume LAYER is flat-shaded It can't be anything else, this makes sure the varyings are sorted properly. Signed-off-by: Alyssa Rosenzweig --- src/asahi/compiler/agx_compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 0ad2703077c..a92ca11111d 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -2371,6 +2371,9 @@ agx_remap_varyings_vs(nir_shader *nir, struct agx_varyings_vs *varyings, varyings->slots[VARYING_SLOT_POS] = base; base += 4; + /* These are always flat-shaded from the FS perspective */ + key->vs.outputs_flat_shaded |= VARYING_SLOT_LAYER | VARYING_SLOT_VIEWPORT; + assert(!(key->vs.outputs_flat_shaded & key->vs.outputs_linear_shaded)); /* Smooth 32-bit user bindings go next */