summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2013-08-29 20:52:18 +0200
committerRoland Scheidegger <sroland@vmware.com>2013-08-30 23:20:03 +0200
commit61add3cc3c68b3b1faffc468c2a2b882c267f94b (patch)
treea945641e8ae56354df7549bfadbcc9b01feebc6d /src/gallium/auxiliary/gallivm
parentbdf3f50e9a85e4c063b46ceaf23bceb07b06b82e (diff)
gallivm: don't use AoS path if min/mag filter are different with multiple lods
Instead of enhancing the AoS path so it can deal with it, just use SoA. Fixing AoS path wouldn't be all that difficult (use all the same logic as SoA) but considered not worth it for now. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 7f919517cc9..26a65d08f8a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -2264,6 +2264,10 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
/* not sure this is strictly needed or simply impossible */
static_sampler_state->compare_mode == PIPE_TEX_COMPARE_NONE &&
lp_is_simple_wrap_mode(static_sampler_state->wrap_s);
+
+ use_aos &= bld.num_lods <= num_quads ||
+ static_sampler_state->min_img_filter ==
+ static_sampler_state->mag_img_filter;
if (dims > 1) {
use_aos &= lp_is_simple_wrap_mode(static_sampler_state->wrap_t);
if (dims > 2) {
@@ -2292,7 +2296,8 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
/*
* we only try 8-wide sampling with soa as it appears to
- * be a loss with aos with AVX (but it should work).
+ * be a loss with aos with AVX (but it should work, except
+ * for conformance if min_filter != mag_filter if num_lods > 1).
* (It should be faster if we'd support avx2)
*/
if (num_quads == 1 || !use_aos) {