agx/nir_lower_tess: use nir_lower_default_point_size

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34762>
This commit is contained in:
Alyssa Rosenzweig 2025-04-28 15:34:12 -04:00 committed by Marge Bot
parent d53a3a081b
commit a49403f4ac

View file

@ -243,18 +243,8 @@ agx_nir_lower_tes(nir_shader *tes, bool to_hw_vs)
nir_shader_intrinsics_pass(tes, lower_tes, nir_metadata_control_flow, NULL);
/* Points mode renders as points, make sure we write point size for the HW */
if (tes->info.tess.point_mode &&
!(tes->info.outputs_written & VARYING_BIT_PSIZ) && to_hw_vs) {
nir_function_impl *impl = nir_shader_get_entrypoint(tes);
nir_builder b = nir_builder_at(nir_after_impl(impl));
nir_store_output(&b, nir_imm_float(&b, 1.0), nir_imm_int(&b, 0),
.io_semantics.location = VARYING_SLOT_PSIZ,
.write_mask = nir_component_mask(1), .range = 1,
.src_type = nir_type_float32);
tes->info.outputs_written |= VARYING_BIT_PSIZ;
if (tes->info.tess.point_mode && to_hw_vs) {
nir_lower_default_point_size(tes);
}
if (to_hw_vs) {