From 18a8c3f7f11307b348f72c64603b5761c0ce406f Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Tue, 19 Nov 2019 21:59:07 +0100 Subject: [PATCH] u_vbuf: Only create driver CSO if no incompatible elements MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Paul Cercueil Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_vbuf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.30.2