break;
}
case nir_intrinsic_load_base_vertex: {
- result = ctx->abi->base_vertex;
+ result = ctx->abi->load_base_vertex(ctx->abi);
break;
}
case nir_intrinsic_load_local_group_size:
}
}
+static LLVMValueRef radv_load_base_vertex(struct ac_shader_abi *abi)
+{
+ return abi->base_vertex;
+}
+
static LLVMValueRef radv_load_ssbo(struct ac_shader_abi *abi,
LLVMValueRef buffer_ptr, bool write)
{
ctx.gs_max_out_vertices = shaders[i]->info.gs.vertices_out;
ctx.abi.load_inputs = load_gs_input;
ctx.abi.emit_primitive = visit_end_primitive;
+ ctx.abi.load_base_vertex = radv_load_base_vertex;
} else if (shaders[i]->info.stage == MESA_SHADER_TESS_CTRL) {
ctx.tcs_outputs_read = shaders[i]->info.outputs_read;
ctx.tcs_patch_outputs_read = shaders[i]->info.patch_outputs_read;
LLVMValueRef (*load_sample_mask_in)(struct ac_shader_abi *abi);
+ LLVMValueRef (*load_base_vertex)(struct ac_shader_abi *abi);
+
/* Whether to clamp the shadow reference value to [0,1]on VI. Radeonsi currently
* uses it due to promoting D16 to D32, but radv needs it off. */
bool clamp_shadow_reference;
else
ctx->abi.emit_outputs = si_llvm_emit_vs_epilogue;
bld_base->emit_epilogue = si_tgsi_emit_epilogue;
+ ctx->abi.load_base_vertex = get_base_vertex;
break;
case PIPE_SHADER_TESS_CTRL:
bld_base->emit_fetch_funcs[TGSI_FILE_INPUT] = fetch_input_tcs;