aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c8
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.h3
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm_sample.c6
3 files changed, 11 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 2614654f192..483b631fe8e 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -2032,7 +2032,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
fake_buf_ptr = LLVMBuildGEP(builder, fake_buf, &bld.zero, 1, "");
/* code generated texture sampling */
- sampler = draw_llvm_sampler_soa_create(draw_llvm_variant_key_samplers(key));
+ sampler = draw_llvm_sampler_soa_create(draw_llvm_variant_key_samplers(key), key->nr_samplers);
image = draw_llvm_image_soa_create(draw_llvm_variant_key_images(key));
@@ -2821,7 +2821,7 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
draw_gs_jit_context_num_ssbos(variant->gallivm, context_ptr);
/* code generated texture sampling */
- sampler = draw_llvm_sampler_soa_create(variant->key.samplers);
+ sampler = draw_llvm_sampler_soa_create(variant->key.samplers, variant->key.nr_samplers);
image = draw_llvm_image_soa_create(draw_gs_llvm_variant_key_images(&variant->key));
mask_val = generate_mask_value(variant, gs_type);
lp_build_mask_begin(&mask, gallivm, gs_type, mask_val);
@@ -3429,7 +3429,7 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
ssbos_ptr = draw_tcs_jit_context_ssbos(variant->gallivm, context_ptr);
num_ssbos_ptr =
draw_tcs_jit_context_num_ssbos(variant->gallivm, context_ptr);
- sampler = draw_llvm_sampler_soa_create(variant->key.samplers);
+ sampler = draw_llvm_sampler_soa_create(variant->key.samplers, variant->key.nr_samplers);
image = draw_llvm_image_soa_create(draw_tcs_llvm_variant_key_images(&variant->key));
LLVMValueRef counter = LLVMGetParam(variant_coro, 5);
@@ -3926,7 +3926,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
ssbos_ptr = draw_tes_jit_context_ssbos(variant->gallivm, context_ptr);
num_ssbos_ptr =
draw_tes_jit_context_num_ssbos(variant->gallivm, context_ptr);
- sampler = draw_llvm_sampler_soa_create(variant->key.samplers);
+ sampler = draw_llvm_sampler_soa_create(variant->key.samplers, variant->key.nr_samplers);
image = draw_llvm_image_soa_create(draw_tes_llvm_variant_key_images(&variant->key));
step = lp_build_const_int32(gallivm, vector_length);
diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
index d327e542afb..949b4c75622 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.h
+++ b/src/gallium/auxiliary/draw/draw_llvm.h
@@ -890,7 +890,8 @@ void
draw_tes_llvm_dump_variant_key(struct draw_tes_llvm_variant_key *key);
struct lp_build_sampler_soa *
-draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state);
+draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state,
+ unsigned nr_samplers);
struct lp_build_image_soa *
draw_llvm_image_soa_create(const struct draw_image_static_state *static_state);
diff --git a/src/gallium/auxiliary/draw/draw_llvm_sample.c b/src/gallium/auxiliary/draw/draw_llvm_sample.c
index a30ebf5eabd..eee0c6319e5 100644
--- a/src/gallium/auxiliary/draw/draw_llvm_sample.c
+++ b/src/gallium/auxiliary/draw/draw_llvm_sample.c
@@ -70,6 +70,8 @@ struct draw_llvm_sampler_soa
struct lp_build_sampler_soa base;
struct draw_llvm_sampler_dynamic_state dynamic_state;
+
+ unsigned nr_samplers;
};
struct draw_llvm_image_dynamic_state
@@ -342,7 +344,8 @@ draw_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base,
}
struct lp_build_sampler_soa *
-draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state)
+draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_state,
+ unsigned nr_samplers)
{
struct draw_llvm_sampler_soa *sampler;
@@ -370,6 +373,7 @@ draw_llvm_sampler_soa_create(const struct draw_sampler_static_state *static_stat
sampler->dynamic_state.base.border_color = draw_llvm_sampler_border_color;
sampler->dynamic_state.static_state = static_state;
+ sampler->nr_samplers = nr_samplers;
return &sampler->base;
}