builder = gallivm->builder;
assert(builder);
LLVMPositionBuilderAtEnd(builder, block);
- sampler = lp_llvm_sampler_soa_create(key->samplers);
+ sampler = lp_llvm_sampler_soa_create(key->samplers, key->nr_samplers);
image = lp_llvm_image_soa_create(lp_cs_variant_key_images(key));
struct lp_build_loop_state loop_state[4];
}
/* code generated texture sampling */
- sampler = lp_llvm_sampler_soa_create(key->samplers);
+ sampler = lp_llvm_sampler_soa_create(key->samplers, key->nr_samplers);
image = lp_llvm_image_soa_create(lp_fs_variant_key_images(key));
num_fs = 16 / fs_type.length; /* number of loops per 4x4 stamp */
struct lp_build_sampler_soa base;
struct llvmpipe_sampler_dynamic_state dynamic_state;
+ unsigned nr_samplers;
};
struct llvmpipe_image_dynamic_state
struct lp_build_sampler_soa *
-lp_llvm_sampler_soa_create(const struct lp_sampler_static_state *static_state)
+lp_llvm_sampler_soa_create(const struct lp_sampler_static_state *static_state,
+ unsigned nr_samplers)
{
struct lp_llvm_sampler_soa *sampler;
sampler->dynamic_state.static_state = static_state;
+ sampler->nr_samplers = nr_samplers;
return &sampler->base;
}
*
*/
struct lp_build_sampler_soa *
-lp_llvm_sampler_soa_create(const struct lp_sampler_static_state *key);
+lp_llvm_sampler_soa_create(const struct lp_sampler_static_state *key,
+ unsigned nr_samplers);
struct lp_build_image_soa *
lp_llvm_image_soa_create(const struct lp_image_static_state *key);