From 23641d40329c324f6d55a133538b1ae81b0b96dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Sat, 25 Jan 2025 02:33:04 +0100 Subject: [PATCH] ac/nir/ngg: Add a few comments explaining some variables. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These were somewhat confusing, so let's add a few words to explain what they are exactly. Reviewed-by: Marek Olšák Part-of: --- src/amd/common/nir/ac_nir_lower_ngg.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/amd/common/nir/ac_nir_lower_ngg.c b/src/amd/common/nir/ac_nir_lower_ngg.c index 254c69ec869..63c126b9d86 100644 --- a/src/amd/common/nir/ac_nir_lower_ngg.c +++ b/src/amd/common/nir/ac_nir_lower_ngg.c @@ -36,9 +36,26 @@ typedef struct nir_variable *position_value_var; nir_variable *prim_exp_arg_var; + + /** + * Whether the current invocation's vertex (if any) is accepted by the culling algorithm. + * Only used when culling is enabled. + */ nir_variable *es_accepted_var; + + /** + * hether the current invocation's primitive (if any) is accepted by the culling algorithm. + * Only used when culling is enabled. + */ nir_variable *gs_accepted_var; + + /** + * Whether the current invocation's primitive (if any) should be exported. + * Initially set to whether the invocation has a vertex, then set to false by the culling + * algorithm if the primitive is rejected. + */ nir_variable *gs_exported_var; + nir_variable *gs_vtx_indices_vars[3]; nir_def *vtx_addr[3];