mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
radeonsi: lower nir_load_tess_rel_patch_id_amd in abi for aco
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23433>
This commit is contained in:
parent
497d563b5e
commit
415ed0567a
1 changed files with 12 additions and 0 deletions
|
|
@ -595,6 +595,18 @@ static bool lower_intrinsic(nir_builder *b, nir_instr *instr, struct lower_abi_s
|
|||
assert(s->esgs_ring);
|
||||
replacement = s->esgs_ring;
|
||||
break;
|
||||
case nir_intrinsic_load_tess_rel_patch_id_amd:
|
||||
/* LLVM need to replace patch id arg, so have to be done in LLVM backend. */
|
||||
if (!shader->use_aco)
|
||||
return false;
|
||||
|
||||
if (stage == MESA_SHADER_TESS_CTRL) {
|
||||
replacement = ac_nir_unpack_arg(b, &args->ac, args->ac.tcs_rel_ids, 0, 8);
|
||||
} else {
|
||||
assert(stage == MESA_SHADER_TESS_EVAL);
|
||||
replacement = ac_nir_load_arg(b, &args->ac, args->ac.tes_rel_patch_id);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue