ac: unify primitive export code

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
Marek Olšák
2019-12-23 19:26:46 -05:00
parent 1c77a18cc2
commit d1c8aeb24f
4 changed files with 78 additions and 113 deletions

View File

@@ -750,6 +750,19 @@ ac_export_mrt_z(struct ac_llvm_context *ctx, LLVMValueRef depth,
void ac_build_sendmsg_gs_alloc_req(struct ac_llvm_context *ctx, LLVMValueRef wave_id,
LLVMValueRef vtx_cnt, LLVMValueRef prim_cnt);
struct ac_ngg_prim {
unsigned num_vertices;
LLVMValueRef isnull;
LLVMValueRef index[3];
LLVMValueRef edgeflag[3];
LLVMValueRef passthrough;
};
LLVMValueRef ac_pack_prim_export(struct ac_llvm_context *ctx,
const struct ac_ngg_prim *prim);
void ac_build_export_prim(struct ac_llvm_context *ctx,
const struct ac_ngg_prim *prim);
static inline LLVMValueRef
ac_get_arg(struct ac_llvm_context *ctx, struct ac_arg arg)
{