nir: Add tessellation related AMD-specific intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201>
This commit is contained in:
Timur Kristóf
2021-02-15 22:01:02 +01:00
committed by Marge Bot
parent 744dc74078
commit 38df949f98
3 changed files with 23 additions and 0 deletions

View File

@@ -1388,6 +1388,11 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht,
res = MAX2(src0, src1);
break;
}
case nir_intrinsic_load_tess_rel_patch_id_amd:
case nir_intrinsic_load_tcs_num_patches_amd:
/* Very generous maximum: TCS/TES executed by largest possible workgroup */
res = config->max_work_group_invocations / MAX2(shader->info.tess.tcs_vertices_out, 1u);
break;
default:
break;
}