mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
freedreno: fix crash when flush() but no rendering
If we haven't created a batch, just bail in pipe->flush(), since there is nothing to do. Fixes crash in warsow, which creates a whole bunch of contexts used for nothing but texture uploads. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
06a51fb4e5
commit
e4ad86952a
1 changed files with 6 additions and 0 deletions
|
|
@ -45,6 +45,12 @@ fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
|
||||||
{
|
{
|
||||||
struct fd_context *ctx = fd_context(pctx);
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
|
|
||||||
|
if (!ctx->batch) {
|
||||||
|
if (fence)
|
||||||
|
*fence = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & PIPE_FLUSH_FENCE_FD)
|
if (flags & PIPE_FLUSH_FENCE_FD)
|
||||||
ctx->batch->needs_out_fence_fd = true;
|
ctx->batch->needs_out_fence_fd = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue