summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-06-01 20:55:17 +0200
committerRoland Scheidegger <[email protected]>2013-06-05 00:29:46 +0200
commitce82523db93d31bc72c8683ccbded1cc721ad34f (patch)
treebe0ae76a10daff20452a3dec207a561de9458978
parentf270baf074d1526beb49d0fbc2175cf02344a5b9 (diff)
gallivm: (trivial) fix lp_build_concat_n
The code was designed to handle no-op concat but failed (unless the caller was using same pointer for src and dst). Reviewed-by: Jose Fonseca <[email protected]>
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_pack.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_pack.c b/src/gallium/auxiliary/gallivm/lp_bld_pack.c
index 0a57e39611c..14fcd385798 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_pack.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_pack.c
@@ -241,8 +241,12 @@ lp_build_concat_n(struct gallivm_state *gallivm,
assert(num_srcs >= num_dsts);
assert((num_srcs % size) == 0);
- if (num_srcs == num_dsts)
+ if (num_srcs == num_dsts) {
+ for (i = 0; i < num_dsts; ++i) {
+ dst[i] = src[i];
+ }
return 1;
+ }
for (i = 0; i < num_dsts; ++i) {
dst[i] = lp_build_concat(gallivm, &src[i * size], src_type, size);