OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
965ceef
)
vc4: Fix a leak of the src[] array of VPM reads in optimization.
author
Eric Anholt
<eric@anholt.net>
Tue, 2 Aug 2016 18:02:21 +0000
(11:02 -0700)
committer
Emil Velikov
<emil.l.velikov@gmail.com>
Thu, 1 Sep 2016 10:39:44 +0000
(11:39 +0100)
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit
a0671d67def9e83ae511f758091b87d4ac34bea4
)
src/gallium/drivers/vc4/vc4_opt_vpm.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/vc4/vc4_opt_vpm.c
b/src/gallium/drivers/vc4/vc4_opt_vpm.c
index
d31b673
..
5df798a
100644
(file)
--- a/
src/gallium/drivers/vc4/vc4_opt_vpm.c
+++ b/
src/gallium/drivers/vc4/vc4_opt_vpm.c
@@
-110,11
+110,12
@@
qir_opt_vpm(struct vc4_compile *c)
* sources are independent of previous instructions
*/
if (temps == 1) {
- list_del(&inst->link);
inst->src[j] = mov->src[0];
- list_replace(&mov->link, &inst->link);
- c->defs[temp] = NULL;
- free(mov);
+
+ list_del(&inst->link);
+ list_addtail(&inst->link, &mov->link);
+ qir_remove_instruction(c, mov);
+
progress = true;
break;
}