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>
51 jobs for !2709 with wip/fence-fd-fix in 14 minutes and 24 seconds (queued for 3 seconds)
detached
Status Job ID Name Coverage
  Container
passed debian-10:amd64 #932443

00:00:20

passed debian-10:arm64 #932446
aarch64

00:00:22

passed debian-10-test:amd64 #932444

00:00:21

passed debian-10-test:arm64 #932447
aarch64

00:00:17

passed debian-9:amd64 #932445

00:00:20

passed lava-container:arm64 #932442

00:00:20

passed lava-container:armhf #932441

00:00:21

 
  Build
passed lava-build:arm64 #932449

00:03:58

passed lava-build:armhf #932448

00:02:11

passed meson-arm64 #932452
aarch64

00:03:45

passed meson-armhf #932451
aarch64

00:04:21

passed meson-clang #932454

00:04:23

passed meson-clover #932457

00:04:08

passed meson-clover-old-llvm #932458

00:04:33

passed meson-i386 #932460

00:03:04

passed meson-main #932450

00:04:33

passed meson-mingw32-x86_64 #932461

00:03:10

passed meson-swr-glvnd #932453

00:02:11

passed meson-vulkan #932459

00:03:11

passed scons #932462

00:08:04

passed scons-old-llvm #932463

00:07:05

passed scons-swr #932455

00:04:06

passed scons-win64 #932456

00:05:40

 
  Test
passed arm64_a306_gles2 1/4 #932488
db410c

00:03:54

passed arm64_a306_gles2 2/4 #932489
db410c

00:05:00

passed arm64_a306_gles2 3/4 #932490
db410c

00:04:06

passed arm64_a306_gles2 4/4 #932491
db410c

00:04:08

passed arm64_a630_gles2 #932477
mesa-cheza

00:05:12

passed arm64_a630_gles31 1/4 #932478
mesa-cheza

00:04:53

passed arm64_a630_gles31 2/4 #932479
mesa-cheza

00:05:53

passed arm64_a630_gles31 3/4 #932480
mesa-cheza

00:05:50

passed arm64_a630_gles31 4/4 #932481
mesa-cheza

00:05:14

passed arm64_a630_gles3 1/6 #932482
mesa-cheza

00:03:43

passed arm64_a630_gles3 2/6 #932483
mesa-cheza

00:03:39

passed arm64_a630_gles3 3/6 #932484
mesa-cheza

00:03:47

passed arm64_a630_gles3 4/6 #932485
mesa-cheza

00:03:49

passed arm64_a630_gles3 5/6 #932486
mesa-cheza

00:03:44

passed arm64_a630_gles3 6/6 #932487
mesa-cheza

00:03:57

passed panfrost-t760-test:armhf #932464
lava-rk3288-veyron-jaq

00:06:22

passed panfrost-t860-test:arm64 #932465
lava-rk3399-gru-kevin

00:05:30

passed piglit-glslparser+quick_shader #932467

00:06:36

passed piglit-quick_gl #932466

00:09:27

passed test-llvmpipe-gles2 1/4 #932468

00:03:36

passed test-llvmpipe-gles2 2/4 #932469

00:03:47

passed test-llvmpipe-gles2 3/4 #932470

00:02:09

passed test-llvmpipe-gles2 4/4 #932471

00:03:44

passed test-softpipe-gles2 1/4 #932472

00:01:33

passed test-softpipe-gles2 2/4 #932473

00:01:35

passed test-softpipe-gles2 3/4 #932474

00:01:02

passed test-softpipe-gles2 4/4 #932475

00:01:37

passed test-softpipe-gles3-limited #932476

00:02:14