Mesa (master): u_vbuf: don't try to delete NULL driver CSO
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 3 07:16:44 UTC 2020
Module: Mesa
Branch: master
Commit: 2271a187c231f1ee2d10d0d777aa53605ed8f59a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2271a187c231f1ee2d10d0d777aa53605ed8f59a
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Jan 2 10:10:57 2020 +0100
u_vbuf: don't try to delete NULL driver CSO
Since 18a8c3f7f11 we don't create a driver CSO if there are any
incompatible elements, so only ask backends to delete it if it exists.
Fixes multiple CTS crashes in V3D.
Fixes: 18a8c3f7f11 ("u_vbuf: Only create driver CSO if no incompatible elements")
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/auxiliary/util/u_vbuf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
index 70eaebb453e..8d50092b4c4 100644
--- a/src/gallium/auxiliary/util/u_vbuf.c
+++ b/src/gallium/auxiliary/util/u_vbuf.c
@@ -849,7 +849,8 @@ static void u_vbuf_delete_vertex_elements(struct u_vbuf *mgr, void *cso)
struct pipe_context *pipe = mgr->pipe;
struct u_vbuf_elements *ve = cso;
- pipe->delete_vertex_elements_state(pipe, ve->driver_cso);
+ if (ve->driver_cso)
+ pipe->delete_vertex_elements_state(pipe, ve->driver_cso);
FREE(ve);
}
More information about the mesa-commit
mailing list