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@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
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);
}