From: Paul Cercueil Date: Tue, 19 Nov 2019 20:59:07 +0000 (+0100) Subject: u_vbuf: Only create driver CSO if no incompatible elements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18a8c3f7f11;p=mesa.git u_vbuf: Only create driver CSO if no incompatible elements Signed-off-by: Paul Cercueil Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 67c82a56ecd..8e67cd965f8 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -811,8 +811,12 @@ u_vbuf_create_vertex_elements(struct u_vbuf *mgr, unsigned count, } } - ve->driver_cso = - pipe->create_vertex_elements_state(pipe, count, driver_attribs); + /* Only create driver CSO if no incompatible elements */ + if (!ve->incompatible_elem_mask) { + ve->driver_cso = + pipe->create_vertex_elements_state(pipe, count, driver_attribs); + } + return ve; }