summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiang Yu <yuq825@gmail.com>2017-10-21 14:47:27 +0800
committerQiang Yu <yuq825@gmail.com>2017-10-21 14:47:27 +0800
commit24e5851127b20985d58c4522ffd6944f8a74f160 (patch)
treeab32bb90eb2a33788fd17ba9beba88d561fb918e
parent01d9d09df424770fc8ab465f8968b49a88da3f68 (diff)
lima: skip draw if no shader (compile fail)
Signed-off-by: Qiang Yu <yuq825@gmail.com>
-rw-r--r--src/gallium/drivers/lima/lima_draw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
index 5be1169d18..a371fb9bb9 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -555,6 +555,11 @@ lima_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
struct lima_context *ctx = lima_context(pctx);
+ if (!ctx->vs || !ctx->fs) {
+ debug_warn_once("no shader, skip draw\n");
+ return;
+ }
+
lima_bo_wait(ctx->gp_buffer->bo, LIMA_BO_WAIT_FLAG_WRITE, 1000000000, true);
if (ctx->dirty & (LIMA_CONTEXT_DIRTY_VERTEX_ELEM|LIMA_CONTEXT_DIRTY_VERTEX_BUFF)) {