From 2e117a7649c1972cf36ec874d852a3e85d4750fa Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 3 May 2016 18:36:52 -0400 Subject: freedreno: allow ctx->draw_vbo to fail Pretty much only happens if shader variant compile fails. But in this case, if we haven't emitted cmdstream, we don't want to set needs_flush. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_draw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c') diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index 66bb1163df2..34b1ff6010c 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -102,8 +102,6 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) return; } - ctx->needs_flush = true; - /* * Figure out the buffers/features we need: */ @@ -195,7 +193,8 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) util_format_short_name(pipe_surface_format(pfb->zsbuf))); fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_DRAW); - ctx->draw_vbo(ctx, info); + if (ctx->draw_vbo(ctx, info)) + ctx->needs_flush = true; for (i = 0; i < ctx->streamout.num_targets; i++) ctx->streamout.offsets[i] += info->count; -- cgit v1.2.3