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:
d41992c
)
crocus: fix crash on index buffer rebinding.
author
Dave Airlie
<airlied@redhat.com>
Mon, 5 Jul 2021 01:43:52 +0000
(11:43 +1000)
committer
Marge Bot
<eric+marge@anholt.net>
Mon, 5 Jul 2021 01:47:32 +0000
(
01:47
+0000)
This was crashing in plasmashell.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11704>
src/gallium/drivers/crocus/crocus_state.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/crocus/crocus_state.c
b/src/gallium/drivers/crocus/crocus_state.c
index
de5e60e
..
df858c8
100644
(file)
--- a/
src/gallium/drivers/crocus/crocus_state.c
+++ b/
src/gallium/drivers/crocus/crocus_state.c
@@
-8273,7
+8273,8
@@
crocus_rebind_buffer(struct crocus_context *ice,
}
}
- if (res->bind_history & PIPE_BIND_INDEX_BUFFER) {
+ if ((res->bind_history & PIPE_BIND_INDEX_BUFFER) &&
+ ice->state.index_buffer.res) {
if (res->bo == crocus_resource_bo(ice->state.index_buffer.res))
pipe_resource_reference(&ice->state.index_buffer.res, NULL);
}