- stride = unpack_param(&ctx->ac, ctx->tcs_in_layout, 13, 8);
- dw_addr = get_tcs_in_current_patch_offset(ctx);
- dw_addr = get_dw_address(ctx, dw_addr, param, const_index, is_compact, vertex_index, stride,
- indir_index);
-
- for (unsigned i = 0; i < num_components + component; i++) {
- value[i] = ac_lds_load(&ctx->ac, dw_addr);
- dw_addr = LLVMBuildAdd(ctx->builder, dw_addr,
- ctx->ac.i32_1, "");
- }
- result = ac_build_varying_gather_values(&ctx->ac, value, num_components, component);
- return result;
-}
-
-static LLVMValueRef
-load_tcs_output(struct nir_to_llvm_context *ctx,
- nir_intrinsic_instr *instr)
-{
- LLVMValueRef dw_addr;
- LLVMValueRef stride = NULL;
- LLVMValueRef value[4], result;
- LLVMValueRef vertex_index = NULL;
- LLVMValueRef indir_index = NULL;
- unsigned const_index = 0;
- unsigned param;
- const bool per_vertex = nir_is_per_vertex_io(instr->variables[0]->var, ctx->stage);
- const bool is_compact = instr->variables[0]->var->data.compact;
- param = shader_io_get_unique_index(instr->variables[0]->var->data.location);
- get_deref_offset(ctx->nir, instr->variables[0],
- false, NULL, per_vertex ? &vertex_index : NULL,
- &const_index, &indir_index);
-
- if (!instr->variables[0]->var->data.patch) {
- stride = unpack_param(&ctx->ac, ctx->tcs_out_layout, 13, 8);
- dw_addr = get_tcs_out_current_patch_offset(ctx);