From 8b9ed851ec9f9aa2d5ce3d1a3a601b4cc756185f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 30 Apr 2024 15:37:28 -0400 Subject: [PATCH] nir: add is_first_fan_agx sysval needed for correct flatshading with fans, without falling back on software input assembly. Signed-off-by: Alyssa Rosenzweig Acked-by: Faith Ekstrand Part-of: --- src/compiler/nir/nir_intrinsics.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index 16b1bf68964..2237208a918 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -1809,6 +1809,10 @@ system_value("active_subgroup_invocation_agx", 1) # for [-1, 1]. system_value("clip_z_coeff_agx", 1) +# True if drawing triangle fans with first vertex provoking, false otherwise. +# This affects flatshading, which is defined weirdly for fans with first. +system_value("is_first_fan_agx", 1, bit_sizes=[1]) + # mesa_prim for the input topology (in a geometry shader) system_value("input_topology_agx", 1)