mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 04:50:11 +01:00
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 <jfonseca@vmware.com>
This commit is contained in:
parent
f270baf074
commit
ce82523db9
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue