Mesa (master): u_vbuf: Only create driver CSO if no incompatible elements
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Dec 21 18:46:11 UTC 2019
Module: Mesa
Branch: master
Commit: 18a8c3f7f11307b348f72c64603b5761c0ce406f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=18a8c3f7f11307b348f72c64603b5761c0ce406f
Author: Paul Cercueil <paul at crapouillou.net>
Date: Tue Nov 19 21:59:07 2019 +0100
u_vbuf: Only create driver CSO if no incompatible elements
Signed-off-by: Paul Cercueil <paul at crapouillou.net>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2807>
---
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;
}
More information about the mesa-commit
mailing list