static LLVMValueRef
 load_tcs_varyings(struct ac_shader_abi *abi,
+                 LLVMTypeRef type,
                  LLVMValueRef vertex_index,
                  LLVMValueRef indir_index,
                  unsigned const_index,
 
 static LLVMValueRef
 load_tes_input(struct ac_shader_abi *abi,
+              LLVMTypeRef type,
               LLVMValueRef vertex_index,
               LLVMValueRef param_index,
               unsigned const_index,
                         false, NULL, is_patch ? NULL : &vertex_index,
                         &const_index, &indir_index);
 
-       result = ctx->abi->load_tess_varyings(ctx->abi, vertex_index, indir_index,
+       LLVMTypeRef dest_type = get_def_type(ctx, &instr->dest.ssa);
+
+       LLVMTypeRef src_component_type;
+       if (LLVMGetTypeKind(dest_type) == LLVMVectorTypeKind)
+               src_component_type = LLVMGetElementType(dest_type);
+       else
+               src_component_type = dest_type;
+
+       result = ctx->abi->load_tess_varyings(ctx->abi, src_component_type,
+                                             vertex_index, indir_index,
                                              const_index, location, driver_location,
                                              instr->variables[0]->var->data.location_frac,
                                              instr->num_components,
                                              is_patch, is_compact, load_inputs);
-       return LLVMBuildBitCast(ctx->ac.builder, result, get_def_type(ctx, &instr->dest.ssa), "");
+       return LLVMBuildBitCast(ctx->ac.builder, result, dest_type, "");
 }
 
 static LLVMValueRef visit_load_var(struct ac_nir_context *ctx,
 
 }
 
 static LLVMValueRef si_nir_load_tcs_varyings(struct ac_shader_abi *abi,
+                                            LLVMTypeRef type,
                                             LLVMValueRef vertex_index,
                                             LLVMValueRef param_index,
                                             unsigned const_index,
 }
 
 LLVMValueRef si_nir_load_input_tes(struct ac_shader_abi *abi,
+                                  LLVMTypeRef type,
                                   LLVMValueRef vertex_index,
                                   LLVMValueRef param_index,
                                   unsigned const_index,