From 7f500cc6e4a62368f5ef67ee76e6868ace1799e7 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 27 Feb 2025 10:28:10 +0200 Subject: [PATCH] brw: store input_vertices on tcs_prog_data Will allow the driver to know if the vertices count is dynamic. Signed-off-by: Lionel Landwerlin Reviewed-by: Ivan Briano Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_compile_tcs.cpp | 1 + src/intel/compiler/brw_compiler.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/intel/compiler/brw_compile_tcs.cpp b/src/intel/compiler/brw_compile_tcs.cpp index 7f682238be3..c32f6f96a5f 100644 --- a/src/intel/compiler/brw_compile_tcs.cpp +++ b/src/intel/compiler/brw_compile_tcs.cpp @@ -218,6 +218,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, bool has_primitive_id = BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_PRIMITIVE_ID); + prog_data->input_vertices = key->input_vertices; prog_data->patch_count_threshold = get_patch_count_threshold(key->input_vertices); if (compiler->use_tcs_multi_patch) { diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index b548dcfc105..cf5c6ed3040 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -1102,6 +1102,9 @@ struct brw_tcs_prog_data { struct brw_vue_prog_data base; + /** Number of input vertices, 0 means dynamic */ + unsigned input_vertices; + /** Should the non-SINGLE_PATCH payload provide primitive ID? */ bool include_primitive_id;