diff --git a/src/intel/compiler/brw/brw_compile_tcs.cpp b/src/intel/compiler/brw/brw_compile_tcs.cpp index da991e9c8dc..64a6e29fab2 100644 --- a/src/intel/compiler/brw/brw_compile_tcs.cpp +++ b/src/intel/compiler/brw/brw_compile_tcs.cpp @@ -224,6 +224,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_PRIMITIVE_ID); prog_data->input_vertices = key->input_vertices; + prog_data->output_vertices = nir->info.tess.tcs_vertices_out; 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/brw_compiler.h b/src/intel/compiler/brw/brw_compiler.h index 76b7afd3be0..5b6da7a1874 100644 --- a/src/intel/compiler/brw/brw_compiler.h +++ b/src/intel/compiler/brw/brw_compiler.h @@ -1175,6 +1175,9 @@ struct brw_tcs_prog_data /** Number of input vertices, 0 means dynamic */ unsigned input_vertices; + /** Number of output vertices */ + unsigned output_vertices; + /** Should the non-SINGLE_PATCH payload provide primitive ID? */ bool include_primitive_id; diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index 5c4c125b2ed..d4f7f9eeb7e 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -2550,7 +2550,7 @@ cmd_buffer_flush_gfx_runtime_state(struct anv_gfx_dynamic_state *hw_state, SET(TESS_CONFIG, tess_config, intel_tess_config(dyn->ts.patch_control_points, - tcs_prog_data->instances, + tcs_prog_data->output_vertices, brw_tess_info_domain(tess_info), tcs_prog_data->base.vue_map.num_per_patch_slots, tcs_prog_data->base.vue_map.num_per_vertex_slots,