freedreno: fix eglDupNativeFenceFD error
authorRob Clark <robdclark@chromium.org>
Tue, 12 Nov 2019 17:01:34 +0000 (09:01 -0800)
committerRob Clark <robdclark@chromium.org>
Tue, 12 Nov 2019 19:38:16 +0000 (11:38 -0800)
commitd509a462254eb89002b729070f92d5708ac32afa
tree53502fa27f4bc23f79440ba86d038882ae976e85
parentbd49dedae062ea5785141735902919330c0608d9
freedreno: fix eglDupNativeFenceFD error

We can end up with scenarios where last_fence is associated with a batch
that is flushed through some other path before needs_out_fence_fd gets
set.  Resulting in returning a fence that has no backing fd.

The simplest thing is to just skip the optimization to try and avoid
no-op batches when a fence-fd is requested.  This should normally be
just once a frame anyways.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/gallium/drivers/freedreno/freedreno_context.c