projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daaf5f1
)
freedreno: Break out of "should we free the entry" loop once we've freed.
author
Eric Anholt
<eric@anholt.net>
Tue, 1 Dec 2020 21:47:28 +0000
(13:47 -0800)
committer
Marge Bot
<eric+marge@anholt.net>
Wed, 2 Dec 2020 20:43:33 +0000
(20:43 +0000)
Fixes a use-after-free of the state on the next iteration when it was
probably just destroyed.
Fixes:
6de01faac5a2
("freedreno/a6xx: invalidate tex state cache entries on rebind")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7695>
src/gallium/drivers/freedreno/a6xx/fd6_texture.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
index
7c55596
..
84f1636
100644
(file)
--- a/
src/gallium/drivers/freedreno/a6xx/fd6_texture.c
+++ b/
src/gallium/drivers/freedreno/a6xx/fd6_texture.c
@@
-512,6
+512,7
@@
fd6_rebind_resource(struct fd_context *ctx, struct fd_resource *rsc)
for (unsigned i = 0; i < ARRAY_SIZE(state->key.view); i++) {
if (rsc->seqno == state->key.view[i].rsc_seqno) {
remove_tex_entry(fd6_ctx, entry);
+ break;
}
}
}