Commit 52a050ea authored by Dave Airlie's avatar Dave Airlie Committed by Marge Bot

llvmpipe: add support for indirect texture access.

This hooks up the sampler switch statement generator
 to the llvmpipe sampler interface.
Reviewed-by: default avatarRoland Scheidegger <>
Part-of: <!3778>
parent 6dc904f6
......@@ -360,10 +360,27 @@ lp_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base,
if (params->texture_index_offset) {
struct lp_build_sample_array_switch switch_info;
memset(&switch_info, 0, sizeof(switch_info));
LLVMValueRef unit = LLVMBuildAdd(gallivm->builder, params->texture_index_offset,
lp_build_const_int32(gallivm, texture_index), "");
lp_build_sample_array_init_soa(&switch_info, gallivm, params, unit,
0, sampler->nr_samplers);
for (unsigned i = 0; i < sampler->nr_samplers; i++) {
lp_build_sample_array_case_soa(&switch_info, i,
} else {
gallivm, params);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment