is_patch);
LLVMValueRef value[4];
- for (unsigned i = 0; i < num_components + component; i++) {
+ for (unsigned i = 0; i < num_components; i++) {
unsigned offset = i;
if (llvm_type_is_64bit(ctx, type))
offset *= 2;
- value[i] = lds_load(bld_base, type, offset, dw_addr);
+ offset += component;
+ value[i + component] = lds_load(bld_base, type, offset, dw_addr);
}
return ac_build_varying_gather_values(&ctx->ac, value, num_components, component);
* between the NIR and TGSI backends.
*/
LLVMValueRef value[4];
- for (unsigned i = component; i < num_components + component; i++) {
+ for (unsigned i = 0; i < num_components; i++) {
unsigned offset = i;
if (llvm_type_is_64bit(ctx, type))
offset *= 2;
- value[i] = buffer_load(&ctx->bld_base, type, offset,
- ctx->tess_offchip_ring, base, addr, true);
+ offset += component;
+ value[i + component] = buffer_load(&ctx->bld_base, type, offset,
+ ctx->tess_offchip_ring, base, addr, true);
}
return ac_build_varying_gather_values(&ctx->ac, value, num_components, component);
struct si_shader_context *ctx = si_shader_context_from_abi(abi);
LLVMValueRef value[4];
- for (unsigned i = component; i < num_components + component; i++) {
+ for (unsigned i = 0; i < num_components; i++) {
unsigned offset = i;
if (llvm_type_is_64bit(ctx, type))
offset *= 2;
- value[i] = si_llvm_load_input_gs(&ctx->abi, driver_location / 4,
- vertex_index, type, offset);
+ offset += component;
+ value[i + component] = si_llvm_load_input_gs(&ctx->abi, driver_location / 4,
+ vertex_index, type, offset);
}
return ac_build_varying_gather_values(&ctx->ac, value, num_components, component);