asahi: eliminate load_num_workgroups from TCS unrolled ID

honeykrisp doesn't want to implement this sysval, we don't need it here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30051>
This commit is contained in:
Alyssa Rosenzweig 2024-07-11 15:40:09 -04:00 committed by Marge Bot
parent ae769727d8
commit bda1de89db
2 changed files with 8 additions and 3 deletions

View file

@ -31,9 +31,8 @@ tcs_instance_id(nir_builder *b)
static nir_def *
tcs_unrolled_id(nir_builder *b)
{
nir_def *stride = nir_channel(b, nir_load_num_workgroups(b), 0);
return nir_iadd(b, nir_imul(b, tcs_instance_id(b), stride), tcs_patch_id(b));
return libagx_tcs_unrolled_id(b, nir_load_tess_param_buffer_agx(b),
nir_load_workgroup_id(b));
}
uint64_t

View file

@ -19,6 +19,12 @@ libagx_tes_patch_vertices_in(constant struct libagx_tess_args *p)
return p->output_patch_size;
}
uint
libagx_tcs_unrolled_id(constant struct libagx_tess_args *p, uint3 wg_id)
{
return (wg_id.y * p->patches_per_instance) + wg_id.x;
}
ushort
libagx_tcs_in_offset(uint vtx, gl_varying_slot location,
uint64_t crosslane_vs_out_mask)