frontend/dri: Fix fence-fd logic

We can't ask for a fence fd if we don't pass PIPE_FLUSH_FENCE_FD.  Also
don't leak fences.

Fixes: abec42c9 ("gallium/dri: implement EGL_KHR_mutable_render_buffer")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <!11202>
144 jobs for !11202 with egl/fence-fd in 29 minutes and 48 seconds (queued for 7 seconds)
latest detached
Status Job ID Name Coverage
  Sanity
passed #10552343
sanity

00:00:08

 
  Container
passed #10552349
aarch64
arm_build

00:00:26

passed #10552351
windows shell 1809 mesa
windows_build_vs2019

00:00:11

passed #10552345
x86_build-base

00:00:28

passed #10552347
x86_test-base

00:00:20

 
  Container 2
passed #10552361
android_build

00:00:33

passed #10552356
i386_build

00:00:22

passed #10552365
kernel+rootfs_amd64

00:00:59

passed #10552367
aarch64
kernel+rootfs_arm64

00:00:54

passed #10552369
aarch64
kernel+rootfs_armhf

00:00:11

passed #10552357
ppc64el_build

00:00:33

passed #10552359
s390x_build

00:00:23

passed #10552354
x86_build

00:00:28

passed #10552362
x86_test-gl

00:00:20

passed #10552364
x86_test-vk

00:00:21

 
  Meson X86 64
passed #10552380
meson-clang

00:04:45

passed #10552381
meson-clover

00:01:43

passed #10552375
meson-clover-testing

00:02:35

passed #10552376
meson-gallium

00:06:03

passed #10552378
meson-release

00:03:33

passed #10552371
meson-testing

00:02:40

passed #10552373
meson-testing-asan

00:03:20

passed #10552383
meson-vulkan

00:01:22

 
  Build Misc
passed #10552385
arm_test

00:00:28

passed #10552387
meson-android

00:00:49

passed #10552390
aarch64
meson-arm64

00:01:21

passed #10552392
aarch64
meson-arm64-asan

00:03:51

passed #10552394
aarch64
meson-arm64-build-test

00:01:39

passed #10552388
aarch64
meson-armhf

00:01:50

passed #10552399
meson-i386

00:03:48

passed #10552404
meson-mingw32-x86_64

00:02:35

passed #10552402
meson-ppc64el

00:04:18

passed #10552401
kvm
meson-s390x

00:04:03

passed #10552396
windows docker 1809 mesa
meson-windows-vs2019

00:05:21

 
  Amd
passed #10552414
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radeonsi-stoney-gles2:amd64

00:09:58

passed #10552420
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radeonsi-stoney-gles31:amd64 1/2

00:14:48

passed #10552422
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radeonsi-stoney-gles31:amd64 2/2

00:21:41

passed #10552416
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radeonsi-stoney-gles3:amd64 1/2

00:13:45

passed #10552418
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radeonsi-stoney-gles3:amd64 2/2

00:11:16

passed #10552426
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radeonsi-stoney-piglit-gl:amd64

00:13:28

passed #10552424
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radeonsi-stoney-traces:amd64

00:18:38

passed #10552412
radv-fossils

00:05:35

passed #10552406
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radv_stoney_vkcts:amd64 1/3

00:13:50

passed #10552408
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radv_stoney_vkcts:amd64 2/3

00:15:47

passed #10552410
mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
radv_stoney_vkcts:amd64 3/3

00:16:16

 
  Intel
passed #10552444
mesa-ci-x86-64-lava-asus-C433TA-AJ0005-rammus
iris-amly-egl

00:05:18

passed #10552442
mesa-ci-x86-64-lava-asus-C433TA-AJ0005-rammus
iris-amly-gl

00:09:39

passed #10552436
mesa-ci-x86-64-lava-asus-C433TA-AJ0005-rammus
iris-amly-gles2

00:06:36

passed #10552438
mesa-ci-x86-64-lava-asus-C433TA-AJ0005-rammus
iris-amly-gles3

00:10:34

passed #10552440
mesa-ci-x86-64-lava-asus-C433TA-AJ0005-rammus
iris-amly-gles31

00:12:02

passed #10552449
mesa-ci-x86-64-lava-asus-C433TA-AJ0005-rammus
iris-amly-traces

00:07:13

passed #10552434
mesa-ci-x86-64-lava-asus-C523NA-A20057-coral
iris-apl-egl

00:12:11

passed #10552428
mesa-ci-x86-64-lava-asus-C523NA-A20057-coral
iris-apl-gles2

00:14:41

passed #10552430
mesa-ci-x86-64-lava-asus-C523NA-A20057-coral
iris-apl-gles3

00:14:25

passed #10552432
mesa-ci-x86-64-lava-asus-C523NA-A20057-coral
iris-apl-gles31

00:12:20

passed #10552447
mesa-ci-x86-64-lava-asus-C523NA-A20057-coral
iris-apl-traces

00:15:49

 
  Arm
passed #10552469
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
panfrost-g52-gles31:arm64

00:12:34

passed #10552465
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
panfrost-g52-gles3:arm64 1/2

00:08:11

passed #10552467
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
panfrost-g52-gles3:arm64 2/2

00:10:15

passed #10552451
mesa-ci-x86-64-lava-sun50i-h6-pine-h64
panfrost-t720-gles2:arm64

00:12:21

passed #10552453
mesa-ci-x86-64-lava-rk3288-veyron-jaq
panfrost-t760-gles2:armhf

00:10:29

passed #10552455
mesa-ci-x86-64-lava-rk3288-veyron-jaq
panfrost-t760-traces:armhf

00:07:54

passed #10552461
mesa-ci-x86-64-lava-rk3399-gru-kevin
panfrost-t860-gles31:arm64

00:10:49

passed #10552457
mesa-ci-x86-64-lava-rk3399-gru-kevin
panfrost-t860-gles3:arm64 1/2

00:12:31

passed #10552459
mesa-ci-x86-64-lava-rk3399-gru-kevin
panfrost-t860-gles3:arm64 2/2

00:08:59

passed #10552463
mesa-ci-x86-64-lava-rk3399-gru-kevin
panfrost-t860-traces:arm64

00:06:50

 
  Broadcom
passed #10552491
igalia-rpi4
v3d-rpi4-gles2:armhf

00:07:07

passed #10552479
igalia-rpi4
v3d-rpi4-gles31:armhf 1/2

00:09:51

passed #10552481
igalia-rpi4
v3d-rpi4-gles31:armhf 2/2

00:10:21

passed #10552483
igalia-rpi4
v3d-rpi4-gles3:armhf 1/4

00:09:11

passed #10552485
igalia-rpi4
v3d-rpi4-gles3:armhf 2/4

00:09:42

passed #10552487
igalia-rpi4
v3d-rpi4-gles3:armhf 3/4

00:08:12

passed #10552489
igalia-rpi4
v3d-rpi4-gles3:armhf 4/4

00:08:41

passed #10552493
igalia-rpi4
v3dv-rpi4-vk:armhf 1/6

00:08:13

passed #10552495
igalia-rpi4
v3dv-rpi4-vk:armhf 2/6

00:07:50

passed #10552497
igalia-rpi4
v3dv-rpi4-vk:armhf 3/6

00:07:44

passed #10552499
igalia-rpi4
v3dv-rpi4-vk:armhf 4/6

00:07:52

passed #10552501
igalia-rpi4
v3dv-rpi4-vk:armhf 5/6

00:07:59

passed #10552503
igalia-rpi4
v3dv-rpi4-vk:armhf 6/6

00:08:00

passed #10552471
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4

00:04:23

passed #10552473
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4

00:04:37

passed #10552475
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4

00:04:20

passed #10552477
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4

00:04:02

 
  Freedreno
passed #10552505
google-freedreno-db410c
a306_gles2

00:04:53

passed #10552507
google-freedreno-db410c
a306_gles3 1/3

00:08:59

passed #10552509
google-freedreno-db410c
a306_gles3 2/3

00:08:56

passed #10552511
google-freedreno-db410c
a306_gles3 3/3

00:09:05

passed #10552513
google-freedreno-db410c
a306_gles3_options

00:03:52

passed #10552515
google-freedreno-db410c
a306-traces

00:02:52

passed #10552517
google-freedreno-db820c
a530_gles2

00:06:01

passed #10552523
google-freedreno-db820c
a530_gles31 1/2

00:06:35

passed #10552519
google-freedreno-db820c
a530_gles3 1/2

00:08:41

passed #10552525
google-freedreno-db820c
a530_gles31 2/2

00:06:10

passed #10552521
google-freedreno-db820c
a530_gles3 2/2

00:09:01

passed #10552527
google-freedreno-db820c
a530_piglit_shader 1/2

00:09:10

passed #10552529
google-freedreno-db820c
a530_piglit_shader 2/2

00:08:56

passed #10552531
google-freedreno-db820c
a530-traces

00:07:30

passed #10552541
google-freedreno-cheza
a630_egl

00:02:30

passed #10552539
google-freedreno-cheza
a630_gl

00:01:33

passed #10552533
google-freedreno-cheza
a630_gles2

00:01:35

passed #10552537
google-freedreno-cheza
a630_gles3

00:04:52

passed #10552535
google-freedreno-cheza
a630_gles31

00:04:07

passed #10552543
google-freedreno-cheza
a630_gles_others

00:02:38

passed #10552553
google-freedreno-cheza
a630_piglit

00:09:43

passed #10552555
google-freedreno-cheza
a630-traces

00:04:48

passed #10552545
google-freedreno-cheza
a630_vk 1/2

00:10:57

passed #10552548
google-freedreno-cheza
a630_vk 2/2

00:10:43

passed #10552550
google-freedreno-cheza
a630_vk_sysmem

00:02:09

 
  Software Renderer
passed #10552602
lavapipe-nir-stress

00:01:05

passed #10552600
lavapipe-vk

00:03:03

passed #10552578
llvmpipe-egl

00:01:22

passed #10552574
llvmpipe-gl

00:02:38

passed #10552568
llvmpipe-gles2

00:02:35

passed #10552570
llvmpipe-gles3

00:02:20

passed #10552572
llvmpipe-gles31

00:08:39

passed #10552576
llvmpipe-khr-gles2

00:00:33

passed #10552558
llvmpipe-piglit-cl

00:01:42

passed #10552562
llvmpipe-piglit-glslparser

00:04:09

passed #10552560
llvmpipe-piglit-quick_gl

00:06:29

passed #10552564
llvmpipe-piglit-quick_shader

00:06:13

passed #10552566
llvmpipe-traces

00:01:49

passed #10552594
softpipe-asan-gles31

00:02:21

passed #10552598
softpipe-gl

00:01:07

passed #10552580
softpipe-gles2

00:00:49

passed #10552582
softpipe-gles3

00:05:51

passed #10552584
softpipe-gles31 1/2

00:05:00

passed #10552586
softpipe-gles31 2/2

00:06:05

passed #10552588
softpipe-khr-gles2

00:00:42

passed #10552590
softpipe-khr-gles3

00:00:36

passed #10552592
softpipe-khr-gles31

00:00:45

passed #10552596
softpipe-piglit-quick

00:07:42

 
  Layered Backends
passed #10552624
windows docker 1809 mesa
test-d3d12-windows

00:04:08

passed #10552613
virgl-gl30-on-gl

00:00:30

passed #10552615
virgl-gl31-on-gl

00:01:01

passed #10552617
virgl-gl32-on-gl

00:01:52

passed #10552605
virgl-gles2-on-gl

00:01:28

passed #10552609
virgl-gles31-on-gl 1/2

00:02:50

passed #10552611
virgl-gles31-on-gl 2/2

00:04:19

passed #10552607
virgl-gles3-on-gl

00:02:51

passed #10552618
virgl-traces

00:00:37

passed #10552623
zink-lvp-gl

00:01:55

passed #10552621
zink-lvp-gles2

00:01:37

passed #10552622
zink-lvp-gles3

00:02:43

passed #10552619
zink-piglit-quick_gl

00:06:22