summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-08-27 01:39:44 +0200
committerRoland Scheidegger <[email protected]>2014-08-30 01:17:46 +0200
commit99105454b000c5c665dca1d4767450ac668a43e7 (patch)
tree0a7a78ec152c9c2e6220808e1317ecc0836c5cf9 /src/gallium/auxiliary
parent85d4cc479050fbedf194d5d89f63e5fd0309f22c (diff)
draw: remove fishy num_samplers/num_sampler_views check in llvm path
This was meant for softpipe to not crash at some point if vertex texturing was used. It is, however, fishy because it uses values from draw_set_samplers/draw_set_sampler_views and not from the shader key. Albeit we should still in all cases actually generate a new shader if this changes (because the samplers and views themselves are in the key) I don't want to think again wondering if that's really correct in the future. Besides, at least today, it does not actually work for softpipe, as this was relying on softpipe not actually calling draw_set_samplers/sampler_views at all - I've verified it crashes regardless (if there were a tex instruction in the vs, which normally should not happen anyway). For drivers which do indeed not call these functions because they don't support vertex texturing at all (r300), this should still not crash because the static texture data is all zero, which causes the sampling functions to take an early out (same as is done if no texture is bound at the slot used for sampling - verified with hacked up softpipe). Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 467f07420e2..e8e837a9785 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -588,16 +588,12 @@ generate_vs(struct draw_llvm_variant *variant,
draw_jit_context_vs_constants(variant->gallivm, context_ptr);
LLVMValueRef num_consts_ptr =
draw_jit_context_num_vs_constants(variant->gallivm, context_ptr);
- struct lp_build_sampler_soa *sampler = 0;
if (gallivm_debug & (GALLIVM_DEBUG_TGSI | GALLIVM_DEBUG_IR)) {
tgsi_dump(tokens, 0);
draw_llvm_dump_variant_key(&variant->key);
}
- if (llvm->draw->num_sampler_views && llvm->draw->num_samplers)
- sampler = draw_sampler;
-
lp_build_tgsi_soa(variant->gallivm,
tokens,
vs_type,
@@ -607,7 +603,7 @@ generate_vs(struct draw_llvm_variant *variant,
system_values,
inputs,
outputs,
- sampler,
+ draw_sampler,
&llvm->draw->vs.vertex_shader->info,
NULL);